Platforms to show: All Mac Windows Linux Cross-Platform

/ChartDirector/High Resolution Chart Examples/cone


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/High Resolution Chart Examples/cone

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

Project "cone.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() const f=4 // scale factor, 1 for screen and 4 or more for printing // 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 &h60000088 colors.Append &h6066aaee colors.Append &h60ffbb00 colors.Append &h60ee6622 // Create a PyramidChart object of size 480 x 400 pixels dim c as new CDPyramidChartMBS(f*480, f*400) // Set the cone center at (280, 180), and width x height to 150 x 300 pixels c.setConeSize(f*280, f*180, f*150, f*300) // Set the elevation to 15 degrees c.setViewAngle(15) // 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) c.setJoinLine(&h000000, f) // Add labels at the left side of the pyramid layers using Arial Bold font. The // labels will have 3 lines showing the layer name, value and percentage. call c.setLeftLabel("{label}"+EndOfLine.unix+"US ${value}K"+EndOfLine.unix+"({percent}%)", "arialbd.ttf",8*f) // Output the chart Backdrop=c.makeChartPicture Width=f*480 Height=f*400 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

See also:

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


The biggest plugin in space...