Example: /ChartDirector/colorbar

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/ChartDirector/colorbar


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

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

Project "colorbar.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(85, 156, 179.5, 211, 123.0) // The labels for the bar chart dim labels(-1) as string = array("Mon", "Tue", "Wed", "Thu", "Fri") // The colors for the bar chart dim colors(4) as integer colors(0)=&hb8bc9c colors(1)=&ha0bdc4 colors(2)=&h999966 colors(3)=&h333366 colors(4)=&hc3c3e6 // Create a XYChart object of size 300 x 220 pixels. Use golden background color. // Use a 2 pixel 3D border. dim c as new CDXYChartMBS(300, 220, CDXYChartMBS.goldColor(), -1, 2) // Add a title box using 10 point Arial Bold font. Set the background color to // metallic blue (9999FF) Use a 1 pixel 3D border. dim t as CDTextBoxMBS t=c.addTitle("Daily Network Load", "arialbd.ttf", 10) t.setBackground(c.metalColor(&h9999ff), -1, 1) // Set the plotarea at (40, 40) and of 240 x 150 pixels in size call c.setPlotArea(40, 40, 240, 150) // Add a multi-color bar chart layer using the given data and colors. Use a 1 // pixel 3D border for the bars. dim l as CDBarLayerMBS l=c.addBarLayer(data, colors) l.setBorderColor(-1, 1) // Set the labels on the x axis. call c.xAxis.setLabels(labels) // 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.


💬 Ask a question or report a problem