ASP Pie Chart Examples - different property settings for csDrawGraph

This page shows a number of pie charts created using the csDrawGraph component. The properties have been varied to show the sort of effects possible.

ASP pie chart with default properties

Default properties, except the size is reduced to fit more examples on the page. Pie diameter and centre location are changed to suit the size.

ASP pie chart - values to one decimal place

The data is shown as percentages of the total. The number of decimal places is set to one.

ShowPercent = true
Decimals = 1

ASP pie chart - labels and values hidden

The labels and values are removed from the pie. The legend area is made bigger by changing the size of the text, squares and spacings.

ShowLabel = false
ShowNumbers = false
Square = 12
Padding = 8
LegendTextSize = 12

ASP pie chart - background colour transparent

The background colour is transparent. The legend is using white as a background so the image background and text background must be set to the transparent colour ("eeeeee"). To show the values as pounds the prefix property is used and Decimals is set to -2.

Transparent = true
TransColor = "eeeeee"
LabelBGColor = "eeeeee"
BGColor = "eeeeee"
LegendBGColor = "ffffff"
Decimals = -2
Prefix = "£"

ASP pie chart - colours changed

The colour is changed so the background is black and the lines are white. The labels have been removed.

ShowLabel = false
GraphPen = "ffffff"
BGColor = "000000"
LegendColor = "ffffff"
LegendBGColor = "000000"
LabelColor = "ffffff"
LabelBGColor = "000000"

The trial component has a sample script included which contains all the properties and their default values. This can be used as a template when using csDrawGraph, although properties that retain the default values do not need to be specified.

There are also examples available of Bar Charts, Stacked Bar Charts and Line Graphs.

Download csDrawGraph here.

Cookies

This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.