Results 1 to 2 of 2

Thread: Passing an array to an object

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Up State NY
    Posts
    525

    Passing an array to an object

    I built a pipeline delimited string with data. With in the object split the string to values to pass to the object. Nothing shows correctly.
    Where is the code going wrong?
    <code>
    <object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"
    id="Microsoft_Licensed_Class_Manager_1_0">
    <param NAME="LPKPath" VALUE="mschart5.lpk" align=center>
    </object>


    <OBJECT ID="MSChart1" WIDTH=90% HEIGHT=70%
    CLASSID="CLSID:31291E80-728C-11CF-93D5-0020AF99504A"
    codebase="mschart.ocx">
    </OBJECT>


    <script LANGUAGE="Vbscript">

    'This sets the chart to a line graph...
    MSChart1.ChartType = 1'3 1=bar, 3=line
    MSChart1.Plot.SeriesCollection(1).Pen.VtColor.Set 0,0,0
    MSChart1.Plot.SeriesCollection(1).Pen.Width = 50
    'MSChart1.Title.Text="Pin Mannufacture by FW"
    For i = 1 To MSChart1.Plot.Axis(1).Labels.Count
    'MSChart1.Plot.Axis(1).Labels(i).Format = "###"
    MSChart1.Plot.Axis(1).AxisTitle="# Pins"
    MSChart1.Plot.Axis(1).Labels(i).VtFont.Name = "Tahoma"
    MSChart1.Plot.Axis(1).Labels(i).VtFont.Size = 10
    Next
    'This sets the # of rows in the chart
    MSChart1.RowCount = 52
    MSChart1.ColumnLabel="2006 Pins"
    MSChart1.ColumnCount = 1
    MSChart1.ShowLegend = True

    Y=0
    PointData=split(FWCount,"|")
    msgbox(ubound(pointdata))
    for x = 1 to 51 'The number of rows we have
    Y=x-1
    msgbox(splitdata(Y))
    MSChart1.Row = x
    MSChart1.RowLabel = "FW " & x

    'call MSChart1.DataGrid.SetData(x, 1, splitdata,nullFlag)
    MSChart1.data= pointdata(Y)
    'call MSChart1.DataGrid.SetData(x, 2, FWdata1,nullFlag)

    next
    </script>
    </code>

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Location
    Up State NY
    Posts
    525

    Re: Passing an array to an object

    The split command does not work. Passing it a complete comma delimited array doe not work.
    Building the string
    <code>
    FWCount = FWCount & "," & totalpins
    </code>
    Displaying it.
    <code>
    for x = 1 to 52 'The number of rows we have
    MSChart1.Row = x
    MSChart1.RowLabel = "FW " & x
    call MSChart1.DataGrid.SetData(x, 1, FWcount,nullFlag)
    next
    </code>
    Nobody knows how to use the MSChart control? On this forum?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width