12345678910111213141516171819202122232425262728293031323334353637 |
- using fwt
- using gfx
- using swtChartWrapper
- class Example13
- {
- public static Void main ()
- {
- // define the series of data points to display
- series := LineSeries
- {
- label = "line series"
- points = [0.0f, 0.4f, 0.7f, 0.9f, 1.0f, 0.9f, 0.7f, 0.4f, 0.0f, -0.4f, -0.7f, -0.9f, -1.0f, -0.9f, -0.7f, -0.4f]
- yErrorBar.with
- {
- color = Color.red
- minusErrors = [0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f]
- plusErrors = [0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f]
- visible = true
- }
- }
- // define a window to display the chart in
- Window
- {
- title = "Example Chart"
- size = Size(450, 350)
- Chart
- {
- title.text = "Error Bars Example"
- xAxis.title.text = "Data Points"
- yAxis.title.text = "Amplitude"
- data = [series]
- },
- }.open
- }
- }
|