Platforms to show: All Mac Windows Linux Cross-Platform

/ChartDirector/multibar


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

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

Project "multibar.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 data for the bar chart dim data0(-1) as double = array(100, 125, 245, 147, 67.0) dim data1(-1) as double = array(85, 156, 179, 211, 123.0) dim data2(-1) as double = array(97, 87, 56, 267, 157.0) // The labels for the bar chart dim labels(-1) as string = array("Mon", "Tue", "Wed", "Thu", "Fri") // Create a XYChart object of size 400 x 240 pixels dim c as new CDXYChartMBS(400, 240) // Add a title to the chart using 10 pt Arial font call c.addTitle(" Average Weekday Network Load", "", 10) // Set the plot area at (50, 25) and of size 320 x 180. Use two alternative // background colors (0xffffc0 and 0xffffe0) call c.setPlotArea(50, 25, 320, 180, &hffffc0, &hffffe0) // Add a legend box at (55, 18) using horizontal layout. Use 8 pt Arial font, // with transparent background dim l as CDLegendBoxMBS l=c.addLegend(55, 18, false, "", 8) l.setBackground(c.kTransparent) // Add a title to the y-axis call c.yAxis.setTitle("Throughput (MBytes Per Hour)") // Reserve 20 pixels at the top of the y-axis for the legend box c.yAxis.setMargin(20) // Set the x axis labels call c.xAxis.setLabels(labels) // Add a multi-bar layer with 3 data sets and 3 pixels 3D depth dim layer as CDBarLayerMBS layer = c.addBarLayer(c.kSide, 3) call layer.addDataSet(data0, &hff8080,"Server #1") call layer.addDataSet(data1, &h80ff80,"Server #2") call layer.addDataSet(data2, &h8080ff,"Server #3") // 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...