|

|
PCS WebCharts©
Professional Computing Solutions, Inc.
|
|
|
|
Example -- Stacked100ColumnChart
A 100% stacked column chart allows you to specify values for individual categories and
then display what percentage those values comprise of the total value of all
categories combined. The chart elements are displayed as vertical bars. The
example below shows the percentage of sales made by stores in individual regions as they
contribute to the total company sales.
|
|
Go Back
|
The following code...
<!-- #include file="Stacked100ColumnChart.asp" -->
<%
Dim x(11, 2)
x(0, 0) = 22
x(0, 1) = 15
x(0, 2) = 4
x(1, 0) = 17
x(1, 1) = 22
x(1, 2) = 11
x(2, 0) = 3
x(2, 1) = 12
x(2, 2) = 7
x(3, 0) = 13
x(3, 1) = 24
x(3, 2) = 17
x(4, 0) = 23
x(4, 1) = 21
x(4, 2) = 3
x(5, 0) = 34
x(5, 1) = 4
x(5, 2) = 9
x(6, 0) = 12
x(6, 1) = 18
x(6, 2) = 6
x(7, 0) = 9
x(7, 1) = 31
x(7, 2) = 21
x(8, 0) = 29
x(8, 1) = 21
x(8, 2) = 12
x(9, 0) = 22
x(9, 1) = 12
x(9, 2) = 19
x(10, 0) = 22
x(10, 1) = 22
x(10, 2) = 22
x(11, 0) = 19
x(11, 1) = 17
x(11, 2) = 7
y = Array("Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec")
z = Array("East", "South", "West")
Stacked100ColumnChart x, y, z, "BgColor:FFFF00;Legend:Y;Dir:F;Show:P;Caption:Sales by Region;CapPos:BOTTOM"
Creates this chart...
Sales by Region | | | 100%--- | | 90%--- | | 80%--- | | 70%--- | | 60%--- | | 50%--- | | 40%--- | | 30%--- | | 20%--- | | 10%--- | | | | | | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | | | |
Send comments or questions on this page to webmaster@thePCSweb.com
Copyright © 1999-2008 Professional Computing Solutions, Inc.
|