Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSChart control

3 views
Skip to first unread message

News

unread,
Mar 29, 2002, 3:31:13 AM3/29/02
to
hi,

i'm using the object tag to embed the mschrt20.ocx. The control works on
some systems and in some it does'nt.

it give me error when i try to access the object using vbscript. it tells me
object does not support is method or property in line
MSChart.TitleText = "Year End Summary".

but when i execute "msgbox document.all.MSChart" it evaluates to an [object]

can anyone let me know what could be the reasons?

i have given the code below

<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Sample MSChart Control</TITLE>
<SCRIPT LANGUAGE="VBSCRIPT">
Function SetType()
MSChart.chartType = document.frmChart.ChartType.value
End Function
</SCRIPT>
</HEAD>
<BODY>
<form name="frmChart">
<select name="ChartType" onChange="SetType()">
<option value="0">3D Bar</option>
<option value="1">2D Bar</option>
<option value="2">3D Line</option>
<option value="3" selected>2D Line</option>
<option value="4">3D Area</option>
<option value="5">2D Area</option>
<option value="6">3D Step</option>
<option value="7">2D Step</option>
<option value="8">3D Combination</option>
<option value="9">2D Combination</option>
<option value="14">2D Pie</option>
<option value="16">2D XY</option>
</select>
</form>

<OBJECT id=MSChart TYPE="application/x-oleobject" style="LEFT: 0px; TOP:
0px" classid="clsid:3A2B370C-BA0A-11D1-B137-0000F8753F5D" width=730
height=430 VIEWASTEXT
codebase="http://activex.microsoft.com/controls/vb6/MSCHRT20.CAB">
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
MSChart.TitleText = "Year End Summary"
MSChart.chartType = 3


MSChart.Plot.SeriesCollection(1).Pen.VtColor.Set 0,0,0
MSChart.Plot.SeriesCollection(1).Pen.Width = 50


For i = 1 To MSChart.Plot.Axis(1).Labels.Count
'Format the Chart labels to Currency
MSChart.Plot.Axis(1).Labels(i).Format = "$#,###"

'Set the font to Tahoma
MSChart.Plot.Axis(1).Labels(i).VtFont.Name = "Verdana"

'Set the font size to 10pt
MSChart.Plot.Axis(1).Labels(i).VtFont.Size = 8
Next

MSChart.RowCount = 5

MSChart.ColumnCount = 2

for x = 1 to 5 'The number of rows we have
'This sets what current row we are editing
MSChart.Row = x

MSChart.RowLabel = "Row " & x

'This plots the points for both columns (1 and 2)
'for the current row (x). The value being
'plotted is x*5 and x*10
call MSChart.DataGrid.SetData(x, 1, x*5,nullFlag)
call MSChart.DataGrid.SetData(x, 2, x*10,nullFlag)
next


MSChart.FootnoteText = "Client Net Market Portfolio Value"
MSChart.ShowLegend = True
</SCRIPT>
</BODY>
</HTML>


Thanks


News

unread,
Mar 29, 2002, 3:38:15 AM3/29/02
to
the systems in which the activex control fails i don't have the vb run-time
files installed. Could this be the reason? do i need to have the vbrun time
files to have this activex component working?

"News" <rvku...@hotmail.com> wrote in message
news:ulPubsv1BHA.1976@tkmsftngp03...

Alex K. Angelopoulos

unread,
Mar 29, 2002, 4:19:39 AM3/29/02
to
Based on what you are describing, I would guess so. Unfortunately, I can't find that filename anywhere on my system to confirm its dependencies.


"News" <rvku...@hotmail.com> wrote in message news:u2BRXwv1BHA.1452@tkmsftngp05...

0 new messages