Dreaming_Eagle
asked on
How to Use the MS Chart Web Component
I am trying to implement the code found in the MS article "HOW TO: Use Server-Side Charting to Generate Charts Dynamically", which utilizes the Chart Web Component (http://support.microsoft.com/support/kb/articles/Q244/0/49.ASP). When I run the code, however, I get the error message: "ActiveX component can't create object: 'OWC.Chart'".
I'm totally new to ASP coding, but is this message not similar to the type of message received when you try to run a Visual Basic ap on a workstation which is missing an .OCX file?
If so, what do I need to install on the web server before I can use this object? If not, what should I do to get it running?
I'm totally new to ASP coding, but is this message not similar to the type of message received when you try to run a Visual Basic ap on a workstation which is missing an .OCX file?
If so, what do I need to install on the web server before I can use this object? If not, what should I do to get it running?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or, You may just install OCX, Msowc.dll
The ActiveX object needs to be installed client-side.
belay that...
Snippet of my code...
<object id=ChartSpace1 classid=CLSID:0002E500-000 0-0000-C00 0-00000000 0046
style="width:50;height:50"
CODEBASE="/otg/MSOWC.CAB#v ersion=9,0 ,0,2710"
VIEWASTEXT></object>
<Script Language="VBScript">
Sub Window_OnLoad()
Dim oChart
Dim oSeries1, oSeries2
dim oConst
Set oConst = ChartSpace1.Constants
'Create a new chart in the ChartSpace
Set oChart = ChartSpace1.Charts.Add
'Add a series of type Column
Set oSeries1 = oChart.SeriesCollection.Ad d
With oSeries1
.SetData oConst.chDimCategories, oConst.chDataLiteral, _
Array("S2T3")
.SetData oConst.chDimValues, oConst.chDataLiteral, _
Array(5485)
.Type = 1
End With
'Add a second series of type Line
Set oSeries2 = oChart.SeriesCollection.Ad d
With oSeries2
.SetData oConst.chDimCategories, oConst.chDataLiteral, _
Array("S2T3")
.SetData oConst.chDimValues, oConst.chDataLiteral, _
Array(5315)
.interior.color = "#FFFFFF"
.Type = 1
End With
oChart.HasLegend = false
oChart.Axes(0).HasTickLabe ls = False
oChart.Axes(1).HasTickLabe ls = False
oChart.Axes(0).HasMinorGri dlines = False
oChart.Axes(0).scaling.max imum = 11500
End Sub
</Script>
<object id=ChartSpace1 classid=CLSID:0002E500-000
style="width:50;height:50"
CODEBASE="/otg/MSOWC.CAB#v
VIEWASTEXT></object>
<Script Language="VBScript">
Sub Window_OnLoad()
Dim oChart
Dim oSeries1, oSeries2
dim oConst
Set oConst = ChartSpace1.Constants
'Create a new chart in the ChartSpace
Set oChart = ChartSpace1.Charts.Add
'Add a series of type Column
Set oSeries1 = oChart.SeriesCollection.Ad
With oSeries1
.SetData oConst.chDimCategories, oConst.chDataLiteral, _
Array("S2T3")
.SetData oConst.chDimValues, oConst.chDataLiteral, _
Array(5485)
.Type = 1
End With
'Add a second series of type Line
Set oSeries2 = oChart.SeriesCollection.Ad
With oSeries2
.SetData oConst.chDimCategories, oConst.chDataLiteral, _
Array("S2T3")
.SetData oConst.chDimValues, oConst.chDataLiteral, _
Array(5315)
.interior.color = "#FFFFFF"
.Type = 1
End With
oChart.HasLegend = false
oChart.Axes(0).HasTickLabe
oChart.Axes(1).HasTickLabe
oChart.Axes(0).HasMinorGri
oChart.Axes(0).scaling.max
End Sub
</Script>
ASKER
Bingo!
Thanks.
Thanks.
Bingo!
Glad I could help!
^_^
Glad I could help!
^_^