Professional Computing Solutions, Inc.
Example -- BarChart
A traditional bar chart -- specify values for individual categories and then display them in comparison to each other using horizontal bars.  The example below shows the amount of sales made in five different states.
Go Back

The following code...

<!-- #include file="BarChart.asp" -->
<%
valList = Array(34.3, 56.1, 87, 99.2, 32)
lblList = Array("PA","NY","NJ", "CT", "MA")
chartOpt = "FormatValue:$;LabelFontFace:Verdana;LabelFontSize:2;"
           "BarFontFace:Tahoma;RegKey:111-XXX-222;PlotColor:008080"
BarChart valList, lblList, chartOpt

Creates this chart...

PA  
$34.3
NY  
$56.1
NJ  
$87
CT  
$99.2
MA  
$32
  $10 $20 $30 $40 $50 $60 $70 $80 $90 $100
 
Example -- BarChartHREF
New in WebCharts Pro!  Creates the same high-quality bar chart, but allows the bars to be hyper linked to other web pages.  Each bar can be linked to a separate page.

The following code...

<!-- #include file="BarChart.asp" -->
<%
valList = Array(34.3, 56.1, 87, 99.2, 32)
lblList = Array("PA","NY","NJ", "CT", "MA")
chartOpt = "Caption:Sales by State;BarFontFace:Tahoma;" & _ 
           "MaxScale:200;GridColor:FF0000;" & _ 
           "LabelColor:0000FF;RegKey:111-XXX-222"
hrefList = Array("Details.asp?STATE=PA", _ 
                 "Details.asp?STATE=NY", _ 
                 "Details.asp?STATE=NJ", _ 
                 "Details.asp?STATE=CT", _ 
                 "Details.asp?STATE=MA")
BarChartHREF valList, lblList, hrefList, chartOpt

Creates this chart...

Sales by State
PA  
34.3
NY  
56.1
NJ  
87
CT  
99.2
MA  
32
  20 40 60 80 100 120 140 160 180 200
 


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