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/rotatedpyramid
This example is the version from Sun, 17th Mar 2012.
Project "rotatedpyramid.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
EventHandler Sub Open() // The data for the pyramid chart dim data(-1) as double = array(156.0, 123, 211, 179) // The labels for the pyramid chart dim labels(-1) as string = array("Funds", "Bonds", "Stocks", "Cash") // The semi-transparent colors for the pyramid layers dim colors(-1) as integer colors.Append &h400000cc colors.Append &h4066aaee colors.Append &h40ffbb00 colors.Append &h40ee6622 // Create a PyramidChart object of size 450 x 400 pixels dim c as new CDPyramidChartMBS(450, 400) // Set the pyramid center at (220, 180), and width x height to 150 x 300 pixels c.setPyramidSize(220, 180, 150, 300) // Set the elevation to 15 degrees and rotation to 75 degrees c.setViewAngle(15, 75) // Set the pyramid data and labels c.setData(data, labels) // Set the layer colors to the given colors c.setColors(c.kDataColor, colors) // Leave 1% gaps between layers c.setLayerGap(0.01) // Add a legend box at (320, 60), with light grey (eeeeee) background and grey // (888888) border. Set the top-left and bottom-right corners to rounded corners // of 10 pixels radius. dim legendBox as CDLegendBoxMBS = c.addLegend(320, 60) legendBox.setBackground(&heeeeee, &h888888) legendBox.setRoundedCorners(10, 0, 10, 0) // Add labels at the center of the pyramid layers using Arial Bold font. The // labels will show the percentage of the layers. call c.setCenterLabel("{percent}%", "arialbd.ttf") // 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 blog