example-7.fan 728 B

12345678910111213141516171819202122232425262728293031323334
  1. using fwt
  2. using gfx
  3. using swtChartWrapper
  4. class Example7
  5. {
  6. public static Void main ()
  7. {
  8. // define the series of data points to display
  9. series := LineSeries
  10. {
  11. label = "line series"
  12. points = [0.6f, 0.4f, 0.7f, 0.06f, 1.9f, 1.7f,
  13. 2.6f, 5.4f, 9.1f, 11.2f, 23.4f, 10.6f,
  14. 54.2f, 40.6f, 68.1f, 110.5f
  15. ]
  16. }
  17. // define a window to display the chart in
  18. Window
  19. {
  20. title = "Example Chart"
  21. size = Size(450, 350)
  22. Chart
  23. {
  24. title.text = "Log Scale Example"
  25. xAxis.title.text = "Data Points"
  26. yAxis.title.text = "Amplitude"
  27. yAxis.enableLogScale = true
  28. data = [series]
  29. },
  30. }.open
  31. }
  32. }