example-8.fan 635 B

12345678910111213141516171819202122232425262728293031
  1. using fwt
  2. using gfx
  3. using swtChartWrapper
  4. class Example8
  5. {
  6. public static Void main ()
  7. {
  8. // define the series of data points to display
  9. series := BarSeries
  10. {
  11. label = "bar series"
  12. points = [0.0f, 0.2f, 0.4f, 0.7f, 0.9f, 1.0f, 0.9f, 0.7f, 0.4f]
  13. }
  14. // define a window to display the chart in
  15. Window
  16. {
  17. title = "Example Chart"
  18. size = Size(450, 350)
  19. Chart
  20. {
  21. title.text = "Orientation Example"
  22. xAxis.title.text = "Data Points"
  23. yAxis.title.text = "Amplitude"
  24. data = [series]
  25. orientation = Orientation.vertical
  26. },
  27. }.open
  28. }
  29. }