Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

Required plugins for this example: MBS ChartDirector Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /ChartDirector/builtinsymbols
This example is the version from Sun, 17th Mar 2012.
Project "builtinsymbols.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class PicWindow Inherits Window
EventHandler Sub Open() // Some ChartDirector built-in symbols dim symbols(-1) as integer symbols.append CDXYChartMBS.kCircleShape symbols.append CDXYChartMBS.kGlassSphereShape symbols.append CDXYChartMBS.kGlassSphere2Shape symbols.append CDXYChartMBS.kSolidSphereShape symbols.append CDXYChartMBS.kSquareShape symbols.append CDXYChartMBS.kDiamondShape symbols.append CDXYChartMBS.kTriangleShape symbols.append CDXYChartMBS.kRightTriangleShape symbols.append CDXYChartMBS.kLeftTriangleShape symbols.append CDXYChartMBS.kInvertedTriangleShape symbols.append CDXYChartMBS.StarShape(3) symbols.append CDXYChartMBS.StarShape(4) symbols.append CDXYChartMBS.StarShape(5) symbols.append CDXYChartMBS.StarShape(6) symbols.append CDXYChartMBS.StarShape(7) symbols.append CDXYChartMBS.StarShape(8) symbols.append CDXYChartMBS.StarShape(9) symbols.append CDXYChartMBS.StarShape(10) symbols.append CDXYChartMBS.PolygonShape(5) symbols.append CDXYChartMBS.Polygon2Shape(5) symbols.append CDXYChartMBS.PolygonShape(6) symbols.append CDXYChartMBS.Polygon2Shape(6) symbols.append CDXYChartMBS.PolygonShape(7) symbols.append CDXYChartMBS.PolygonShape(8) symbols.append CDXYChartMBS.CrossShape(0.1) symbols.append CDXYChartMBS.CrossShape(0.2) symbols.append CDXYChartMBS.CrossShape(0.3) symbols.append CDXYChartMBS.CrossShape(0.4) symbols.append CDXYChartMBS.CrossShape(0.5) symbols.append CDXYChartMBS.CrossShape(0.6) symbols.append CDXYChartMBS.CrossShape(0.7) symbols.append CDXYChartMBS.Cross2Shape(0.1) symbols.append CDXYChartMBS.Cross2Shape(0.2) symbols.append CDXYChartMBS.Cross2Shape(0.3) symbols.append CDXYChartMBS.Cross2Shape(0.4) symbols.append CDXYChartMBS.Cross2Shape(0.5) symbols.append CDXYChartMBS.Cross2Shape(0.6) symbols.append CDXYChartMBS.Cross2Shape(0.7) // Create a XYChart object of size 450 x 400 pixels dim c as new CDXYChartMBS(450, 400) // Set the plotarea at (55, 40) and of size 350 x 300 pixels, with a light grey // border (&hc0c0c0). Turn on both horizontal and vertical grid lines with light // grey color (&hc0c0c0) call c.setPlotArea(55, 40, 350, 300, -1, -1, &hc0c0c0, &hc0c0c0, -1) // Add a title to the chart using 18 pts Times Bold Itatic font. call c.addTitle("Built-in Symbols", "timesbi.ttf", 18) // Set the axes line width to 3 pixels c.xAxis.setWidth(3) c.yAxis.setWidth(3) // Ensure the ticks are at least 1 unit part (integer ticks) c.xAxis.setMinTickInc(1) c.yAxis.setMinTickInc(1) // Add each symbol as a separate scatter layer. dim i as integer for i=0 to UBound(symbols) dim coor1(-1) as double = array(i mod 6 + 1.0) dim coor2(-1) as double = array(i \ 6 + 1.0) call c.addScatterLayer(coor1, coor2, "", symbols(i), 15) next // Output the chart Backdrop=c.makeChartPicture End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS ChartDirector Plugin.

MBS Xojo Plugins