example-3.fan 762 B

123456789101112131415161718192021222324252627282930313233
  1. using fwt
  2. using gfx
  3. using swtChartWrapper
  4. class Example3
  5. {
  6. public static Void main ()
  7. {
  8. // define the series of data points to display
  9. series := ScatterSeries
  10. {
  11. label = "scatter series"
  12. xPoints = [0.1f, 0.0f, 0.2f, 0.4f, 0.7f, 0.9f, 1.0f, 0.9f, 0.7f, 0.4f]
  13. yPoints = [0.2f, 0.4f, 0.7f, 0.9f, 1.0f, 0.9f, 0.7f, 0.4f, 0.2f, 0.0f]
  14. symbolType = PlotSymbolType.inverted_triangle
  15. symbolColor = Color.red
  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 = "Scatter Chart Example"
  25. xAxis.title.text = "Score A"
  26. yAxis.title.text = "Score B"
  27. data = [series]
  28. },
  29. }.open
  30. }
  31. }