Cold Fusion Bar Chart Examples - different property settings for csDrawGraph

This page shows a number of bar charts created using the csDrawGraph COM object. The properties have been varied to show the sort of effects possible. These examples use Cold Fusion.

Default properties, except the size is reduced to fit more examples on the page. Axis and legend position as well as axis length are changed to suit the size.

The graduations on the y-axis are selected manually. The grid lines are displayed.

YGrad = 5
ShowGrid = true
GridStyle = 0
GridColor = "00ffff"

Data values are shown above each bar. The bars are set to a specific width and the legend text, squares and spacings are increased. The labels under the bars are rotated.

ShowBarTotal = true
LabelVertical = true
BarWidth = 40
Square = 12
Padding = 8
LegendTextSize = 12

The background colour (white) is now transparent. Text is added on both axes and a title is shown. The data values are decimals. The legend box has been removed.

YGrad = 0.2
ShowGrid = true
GridStyle = 0
Decimals = -1
ShowLegend = false
Title = "A transparent background"
TitleFont = "Tahoma"
TitleX = 50
XAxisText = "Sample data items"
YAxisText = "Sample values"

The orientation is changed. The labels are removed from the axis. The background colour is black and the graph lines are white.

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

The starting value on the y-axis is 100. This is achieved by setting YOffset to 100. The Suffix property is used to show "M" after each value.

ShowBarTotal = true
YOffset = 100
Suffix = "M"

Another horizontal bar chart. This shows negative values and a different plot area colour.

VerticalBars = false
PlotAreaColor = "00ffff"
LabelBGColor = "00ffff"
MaxX = 150
MaxY = 270
YAxisNegative = 135
ShowGrid = true
GridStyle = 0

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

Download csDrawGraph here.