Path: C:\
VERSION 5.00
Object = "{84E5CF37-E467-4AC2-89C4-C6002FFB5055}#25.1#0"; "ChartViewer.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4035
ClientLeft = 60
ClientTop = 345
ClientWidth = 4230
LinkTopic = "Form1"
ScaleHeight = 4035
ScaleWidth = 4230
StartUpPosition = 3 'Windows Default
Begin CDChartViewer.ChartViewer ChartViewer1
Height = 3750
Left = 240
Top = 150
Width = 3750
_ExtentX = 6615
_ExtentY = 6615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Dim cd As New ChartDirector.API
'The data for the bar chart
Dim data()
data = Array(85, 156, 179.5, 211, 123)
'The labels for the bar chart
Dim labels()
labels = Array("Mon", "Tue", "Wed", "Thu", "Fri")
'Create a XYChart object of size 250 x 250 pixels
Dim c As Object
Set c = cd.XYChart(250, 250)
'Set the plotarea at (30, 20) and of size 200 x 200 pixels
Call c.setPlotArea(30, 20, 200, 200)
'Add a bar chart layer using the given data
Call c.addBarLayer(data)
'Set the x axis labels using the given labels
Call c.xAxis().setLabels(labels)
'output the chart
Set ChartViewer1.Picture = c.makePicture()
'include tool tip for the chart
ChartViewer1.ImageMap = c.getHTMLImageMap("clickable", "", _
"title='{xLabel}: US${value}K'")
End Sub