|

|
PCS WebCharts©
Professional Computing Solutions, Inc.
|
|
|
Example -- Stacked100BarChart
A 100% stacked bar 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 horizontal
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="Stacked100BarChart.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")
Stacked100BarChart x, y, z, "BgColor:A0A000;Legend:Y;Dir:F;Show:V;Caption:Sales by Region;CapPos:BOTTOM"
Creates this chart...
| Jan | | | | Feb | | | Mar | | | Apr | | | May | | | Jun | | | Jul | | | Aug | | | Sep | | | Oct | | | Nov | | | Dec | | Sales by Region | | 10% | 20% | 30% | 40% | 50% | 60% | 70% | 80% | 90% | 100% | | |
Send comments or questions on this page to webmaster@thePCSweb.com
Copyright © 1999-2008 Professional Computing Solutions, Inc.
|