HTML Bar Chart Function library

Source: Internet
Author: User
function <%
' ###################################################
' # # Barchart #
' # # Class to draw bar charts in ASP applications #
' # # Author:anton Bawab #
' # # Written:march 27th 2000 #
' ###################################################

' ###################################################
' # # Include This file in your ASP script #
' # # Assign the Properties #
' # # Then use the Draw method #
' ###################################################

Class Barchart

Private Mchartbgcolor
Private Mcharttitle
Private Mchartwidth
Private Mchartvaluearray
Private Mchartlabelsarray
Private Mchartcolorarray
Private Mchartviewdatatype
Private Mchartbarheight
Private Mchartborder
Private Mcharttextcolor
Private Mchartcounter ' General counter
Private Mchartmaxvalue
Private Mchartfactor
Private mcharttotalvalues
Private Mchartminvalue

Public Property Let Chartbgcolor (Strcolor)
Mchartbgcolor = Strcolor

' Code validation
IF LEN (Mchartbgcolor) <> 7 THEN
Err. Number = vbObjectError + 1000
Err. Description = "Color string provided unequal to 7 characters"
Response.Write Err.Number & VbCRLF & ERR. Description
Err. Clear

EXIT Property
End IF
End Property

Public Property Let ChartTitle (Strtitle)
Mcharttitle = Strtitle
End Property

Public Property Let Chartwidth (Intwidth)
Mchartwidth = intwidth
End Property

Public Property Let Chartvaluearray (arrvalues)

Mchartvaluearray = arrvalues

IF not IsArray (Mchartvaluearray) THEN
Err. Number = vbObjectError + 1001
Err. Description = "Values passed are not an array"
Response.Write Err.Number & VbCRLF & ERR. Description
EXIT Property
Err. Clear
Err. Number = vbObjectError + 1002
Err. Description "Number of values passed does not match labels"
Response.Write Err.Number & VbCRLF & ERR. Description
Err. Clear
EXIT Property
End IF

End Property

Public Property Let Chartlabelsarray (Arrlabels)

Mchartlabelsarray = Arrlabels

IF not IsArray (Mchartlabelsarray) THEN
Err. Number = vbObjectError + 1001
Err. Description = "Label values passed are not an array"
Response.Write Err.Number & VbCRLF & ERR. Description
EXIT Property
&



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.