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