Computer Science Canada 3D Pie Chart |
Author: | do_pete [ Tue Dec 06, 2005 10:12 am ] | ||
Post subject: | 3D Pie Chart | ||
This is a module I created that will draw a 2D pie chart, 2D pie chart with title, 3D pie chart, 3D pie chart with title and legend. The syntax of the command is like this: Chart.DrawPieChart (x, y, radius : int, Items, Colours : array 1 .. * of int) Chart.Draw3DPieChart (x, y, radius, height : int, Items, Colours : array 1 .. * of int) DrawPieChartWTitle (x, y, radius : int, Items, Colours : array 1 .. * of int, title : string, font : int) Draw3DPieChartWTitle (x, y, radius, height : int, Items, Colours : array 1 .. * of int, title : string, font : int) DrawLegend (x, y, font, font2 : int, text : array 1 .. * of string, Colours : array 1 .. * of int) x, y, and radius are pretty self-explanitory. The Items are the values that you want the pie chart to display. The colours are the colours. When making a legend you have to have the names in an array. if you want the legend to be displayed on more than one line you use "\n". You have to more or equal amount of colours as names Here is an example:
|
Author: | Tony [ Tue Dec 06, 2005 10:40 am ] | ||
Post subject: | |||
I like
Excellently done +Bits |
Author: | do_pete [ Tue Dec 06, 2005 11:04 am ] |
Post subject: | |
does anybody know how to make it look more like this: |
Author: | Tony [ Tue Dec 06, 2005 11:37 am ] | ||
Post subject: | |||
in your draw procedure, wrap the
part around in another for loop, for height_loop : 0 .. desired_height Actually it shouldn't be Filled, just the Draw.Arc for the edges. And you'd just have to figure out a darker shade to replace Colours(i) with. |
Author: | do_pete [ Tue Dec 06, 2005 11:54 am ] |
Post subject: | |
thanks tony! It all makes sense now |