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/cylinderlightbar
This example is the version from Sun, 17th Mar 2012.
Project "cylinderlightbar.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 data(-1) as double = array(450.0, 560, 630, 800, 1100, 1350, 1600, 1950, 2300, 2700) // The labels for the bar chart dim labels(-1) as string =array( "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005") // Create a XYChart object of size 600 x 360 pixels dim c as new CDXYChartMBS(600, 360) // Add a title to the chart using 18pts Times Bold Italic font call c.addTitle("Annual Revenue for Star Tech", "timesbi.ttf", 18) // Set the plotarea at (60, 40) and of size 480 x 280 pixels. Use a vertical // gradient color from light green (eeffee) to dark green (008800) as background. // Set border and grid lines to white (ffffff). call c.setPlotArea(60, 40, 480, 280, c.linearGradientColor(60, 40, 60, 280, &heeffee, &h008800), -1, &hffffff, &hffffff) // Add a multi-color bar chart layer using the supplied data. Set cylinder bar // shape. dim b as CDBarLayerMBS dim colors(-1) as integer b=c.addBarLayer(data,colors) b.setBarShape(c.kCircleShape) // Set the labels on the x axis. call c.xAxis.setLabels(labels) // Show the same scale on the left and right y-axes c.syncYAxis // Set the left y-axis and right y-axis title using 10pt Arial Bold font call c.yAxis.setTitle("USD (millions)", "arialbd.ttf", 10) call c.yAxis2.setTitle("USD (millions)", "arialbd.ttf", 10) // Set all axes to transparent c.xAxis.setColors(c.kTransparent) c.yAxis.setColors(c.kTransparent) c.yAxis2.setColors(c.kTransparent) // Set the label styles of all axes to 8pt Arial Bold font call c.xAxis.setLabelStyle("arialbd.ttf", 8) call c.yAxis.setLabelStyle("arialbd.ttf", 8) call c.yAxis2.setLabelStyle("arialbd.ttf", 8) // 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.

The biggest plugin in space...

MBS Xojo Plugins

Start Chat