Professional Computing Solutions, Inc.
Example -- ClusteredColumnChart
ClusteredColumnChart creates a chart using vertical columns broken out into a series of values that lets multiple data points be charted by placing columns next to each other.  It displays information similar to a StackedColumnChart, but the columns are on side-by-side to each other rather than on top of each other. It will support up to 12 groups of columns.  To use this chart, you must include the file ClusteredColumnChart.asp in your ASP page.
Go Back

The following code...

<!-- #include file="ClusteredColumnChart.asp" -->
<%
Dim x(11, 2)
Dim optList
x(0, 0) = 2200
x(0, 1) = 1500
x(0, 2) = 4000

x(1, 0) = 1700
x(1, 1) = 2200
x(1, 2) = 1100

x(2, 0) = 3000
x(2, 1) = 1200
x(2, 2) = 700

x(3, 0) = 1300
x(3, 1) = 2400
x(3, 2) = 1700

x(4, 0) = 2300
x(4, 1) = 2100
x(4, 2) = 300

x(5, 0) = 3400
x(5, 1) = 400
x(5, 2) = 900

y = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun")
z = Array("East", "South", "West")
optList = "BgColor:008080;Legend:Y;Show:X;Dir:F;FormatValue:$;LabelFontFace:Arial;" & _
          "BarFontFace:Tahoma;LabelFontSize:2;RegKey:111-XXX-222;" & _ 
          "Caption:Sales by Region;PlotColor:0000FF;LabelColor:FFFF00"

ClusteredColumnChart x, y, z, optList

Creates this chart...
Sales by Region
 
$4000 ---
$3600 ---
$3200 ---
$2800 ---
$2400 ---
$2000 ---
$1600 ---
$1200 ---
$800 ---
$400 ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Legend
    South
    North
    East
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec  

Example -- ClusteredColumnChartHREF
New in WebCharts Pro!  Creates the same high-quality clustered column chart, but allows the columns to be hyper linked to other web pages.  Each column can be linked to a separate page.

The following code...

<!-- #include file="ClusteredColumnChart.asp" -->
<%
Dim x(11, 2)

x(0, 0) = 2200
x(0, 1) = 1500
x(0, 2) = 4000

x(1, 0) = 1700
x(1, 1) = 2200
x(1, 2) = 1100

x(2, 0) = 3000
x(2, 1) = 1200
x(2, 2) = 700

x(3, 0) = 1300
x(3, 1) = 2400
x(3, 2) = 1700

x(4, 0) = 2300
x(4, 1) = 2100
x(4, 2) = 300

x(5, 0) = 3400
x(5, 1) = 400
x(5, 2) = 900

Dim hrefList2(11, 2)
hrefList2(0, 0) = "details.asp?MTH=0&REG=East"
hrefList2(0, 1) = "details.asp?MTH=0&REG=North"
hrefList2(0, 2) = "details.asp?MTH=0&REG=South"

hrefList2(1, 0) = "details.asp?MTH=1&REG=East"
hrefList2(1, 1) = "details.asp?MTH=1&REG=North"
hrefList2(1, 2) = "details.asp?MTH=1&REG=South"

hrefList2(2, 0) = "details.asp?MTH=2&REG=East"
hrefList2(2, 1) = "details.asp?MTH=2&REG=North"
hrefList2(2, 2) = "details.asp?MTH=2&REG=South"

hrefList2(3, 0) = "details.asp?MTH=3&REG=East"
hrefList2(3, 1) = "details.asp?MTH=3&REG=North"
hrefList2(3, 2) = "details.asp?MTH=3&REG=South"

hrefList2(4, 0) = "details.asp?MTH=4&REG=East"
hrefList2(4, 1) = "details.asp?MTH=4&REG=North"
hrefList2(4, 2) = "details.asp?MTH=4&REG=South"

hrefList2(5, 0) = "details.asp?MTH=5&REG=East"
hrefList2(5, 1) = "details.asp?MTH=5&REG=North"
hrefList2(5, 2) = "details.asp?MTH=5&REG=South"

y = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun")
z = Array("East", "South", "West")
optList = "BgColor:008080;Legend:Y;Show:X;Dir:F;FormatValue:$;LabelFontFace:Arial;" & _
          "BarFontFace:Tahoma;LabelFontSize:2;RegKey:111-XXX-222;" & _ 
          "Caption:Sales by Region;PlotColor:0000FF;LabelColor:FFFF00"

ClusteredColumnChartHREF x, y, z, hrefList, optList

Creates this chart...
Sales by Region
 
$4000 ---
$3600 ---
$3200 ---
$2800 ---
$2400 ---
$2000 ---
$1600 ---
$1200 ---
$800 ---
$400 ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Legend
    South
    North
    East
Jan Feb Mar Apr May Jun  


Send comments or questions on this page to webmaster@thePCSweb.com
Copyright © 1999-2008 Professional Computing Solutions, Inc.