PCS WebCharts©
Professional Computing Solutions, Inc.
Example -- StackedColumnChart
A stacked column chart allows you to specify values for individual categories and then display those values in comparison to the total value of all categories combined.  The chart elements are displayed as vertical bars.  The example below shows the amount of sales made by stores in individual regions as they contribute to the total company sales.
Go Back

The following code...

<!-- #include file="StackedColumnChart.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")

StackedColumnChart x, y, z, "Legend:Y;Show:V;Caption:Sales by Region"

Creates this chart...

Sales by Region
 
70 ---
63 ---
56 ---
49 ---
42 ---
35 ---
28 ---
21 ---
14 ---
7 ---
 
41
4
15
22
50
11
22
17
22
7
12
3
54
17
24
13
47
3
21
23
47
9
4
34
36
6
18
12
61
21
31
9
62
12
21
29
53
19
12
22
66
22
22
22
43
7
17
19
Legend
    West
    South
    East
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.