Platforms to show: All Mac Windows Linux Cross-Platform

/ChartDirector/threedpyramid animated Web


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/threedpyramid animated Web

This example is the version from Mon, 6th Nov 2022.

Project "threedpyramid animated Web.xojo_binary_project"
Class App Inherits WebApplication
End Class
Class Session Inherits WebSession
End Class
Class WebPage1 Inherits WebPage
Control ImageViewer1 Inherits WebImageViewer
ControlInstance ImageViewer1 Inherits WebImageViewer
End Control
Control Timer1 Inherits WebTimer
ControlInstance Timer1 Inherits WebTimer
EventHandler Sub Run() count=count+1 If count=100 Then Me.RunMode = webtimer.RunModes.Off End If redraw End EventHandler
End Control
EventHandler Sub Opening() redraw End EventHandler
Sub redraw() // The data for the pyramid chart dim data(-1) as double = array(156.0, 123, 211, 179.0) // The labels for the pyramid chart dim labels(-1) as string = array("Corporate Tax", "Working Capital", "Re-investment", "Dividend") // The colors for the pyramid layers dim colors(-1) as integer colors.Append &h66aaee colors.Append &heebb22 colors.Append &hcccccc colors.Append &hcc88ff // Create a PyramidChart object of size 500 x 400 pixels dim c as new CDPyramidChartMBS(500, 400) // Set the pyramid center at (200, 180), and width x height to 150 x 300 pixels c.setPyramidSize(200, 180, 150, 300) // Set the elevation to 15 degrees c.setViewAngle(75-count/2, -33+count/3, 50-count/2) // Set the pyramid data and labels c.setData(data, labels) // Set the layer colors to the given colors c.setColors(CDPyramidChartMBS.kDataColor, colors) // Leave 1% gaps between layers c.setLayerGap(0.01) // 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") // Add labels at the right side of the pyramid layers using Arial Bold font. The // labels will have two lines showing the layer name and value. call c.setRightLabel("{label}"+EndOfLine.Unix+"US$ {value}M", "arialbd.ttf") // Output the chart current = c.makeChartPicture ImageViewer1.Picture = current End Sub
Property count As Integer
Property current As Picture
End Class
Sign
End Sign
End Project

See also:

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


The biggest plugin in space...