Platforms to show: All Mac Windows Linux Cross-Platform

/ChartDirector/vector


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/vector

This example is the version from Sun, 17th Mar 2012.

Project "vector.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class PicWindow Inherits Window
EventHandler Sub Open() // The (x, y) coordinates of the starting point of the vectors dim dataX(-1) as double = array(20, 40, 60, 80, 100, 20, 40, 60, 80, 100, 20, 40, 58, 62, 80, 100, 20, 40, 60, 80, 100, 20, 40, 60, 80, 100.0) dim dataY(-1) as double = array(20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 60, 60, 60, 60, 60, 60, 80, 80, 80, 80, 80, 100, 100, 100, 100, 100.0) // The lengths (radii) and directions (angles) of the vectors dim dataR(-1) as double = array(6, 6, 9, 6, 6, 6, 9, 12, 9, 6, 9, 12, 12, 12, 12, 9, 6, 9, 12, 9, 6, 6, 6, 9, 6, 6.0) dim dataA(-1) as double = array(-45, -30, 0, 30, 45, -60, -45, 0, 45, 60, -90, -90, -90, 90, 90, 90, -120, -135, 180, 135, 120, -135, -150, 180, 150, 135.0) // Create a XYChart object of size 450 x 390 pixels dim c as new CDXYChartMBS(450, 390) // 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("Vector Chart Demonstration", "timesbi.ttf", 18) // Add a title to the y axis using 12 pts Arial Bold Italic font call c.yAxis.setTitle("Y Axis Title", "arialbi.ttf", 12) // Add a title to the x axis using 12 pts Arial Bold Italic font call c.xAxis.setTitle("X Axis Title", "arialbi.ttf", 12) // Set the axes line width to 3 pixels c.xAxis.setWidth(3) c.yAxis.setWidth(3) // Add a vector layer to the chart using blue (0000CC) color, with vector arrow // size set to 11 pixels call c.addVectorLayer(dataX, dataY, dataR, dataA, c.kYAxisScale, &h0000cc).setArrowHead(11) // 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

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


The biggest plugin in space...