trial-3.fan 752 B

123456789101112131415161718192021222324252627282930313233343536
  1. using fwt
  2. using gfx
  3. using swtChartWrapper
  4. class Example1
  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.0f, 0.4f, 0.7f, 0.9f, 1.0f]
  13. lineColor = Color.red
  14. lineWidth = 5
  15. lineStyle = LineStyle.dash_dot_dot
  16. symbolColor = Color.blue
  17. symbolSize = 10
  18. symbolType = PlotSymbolType.square
  19. }
  20. // define a window to display the chart in
  21. Window
  22. {
  23. title = "Example Chart"
  24. size = Size(450, 350)
  25. Chart
  26. {
  27. title.text = "Line Chart Example"
  28. xAxis.title.text = "Data Points"
  29. yAxis.title.text = "Amplitude"
  30. data = [series]
  31. },
  32. }.open
  33. }
  34. }