12345678910111213141516171819202122232425262728293031323334353637 |
- using fwt
- using gfx
- using swtChartWrapper
- class Example9
- {
- public static Void main ()
- {
- // define the series of data points to display
- series1 := BarSeries
- {
- label = "bar series 1"
- points = [2.0f, 3.2f, 2.4f, 5.7f, 1.9f]
- }
- series2 := BarSeries
- {
- label = "bar series 2"
- points = [4.0f, 2.2f, 3.4f, 1.7f, 0.9f]
- color = Color.green
- }
- // define a window to display the chart in
- Window
- {
- title = "Example Chart"
- size = Size(450, 350)
- Chart
- {
- title.text = "Category Axis Example"
- xAxis.title.text = "Month"
- xAxis.categories = ["Mar", "Apr", "May", "Jun", "Jul"]
- yAxis.title.text = "Amplitude"
- data = [series1, series2]
- },
- }.open
- }
- }
|