MSChart and JavaScript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • NvrBst

    MSChart and JavaScript

    I can't seem to set the "MSChart1.Chart Data = myArr;" value using
    JavaScript. It says "Bad Argument".

    I've tried setting myArr two ways. 1. var myArr = [1,2,3,4,5]; and 2.
    var x = [1,2,3,4,5]; var myArr = [x];. Both produce the same error.


    I can set the chart by doing "MSChart1.R ow = row;" "MSChart1.Colum n =
    col;" "MSChart1.D ata = 3;". However, I have about a 200 points and
    doing it this way takes the Chart about 20 seconds (it draws to the
    chart after each point is set). I suspect the "MSChart1.Chart Data =
    myArr;" would be faster in this respect.

    Another possbile solution, anyone know how to tell MSChart1 to not
    draw while I set all the points (Then I can just do an
    "MSChart1.Refre sh();" when I'm done setting points.

    Thanks

    NB
  • NvrBst

    #2
    Re: MSChart and JavaScript

    On Jan 4, 12:26 pm, NvrBst <nvr...@gmail.c omwrote:
    I can't seem to set the "MSChart1.Chart Data = myArr;" value using
    JavaScript.  It says "Bad Argument".
    >
    I've tried setting myArr two ways.  1. var myArr = [1,2,3,4,5]; and 2.
    var x = [1,2,3,4,5]; var myArr = [x];.  Both produce the same error.
    >
    I can set the chart by doing "MSChart1.R ow = row;" "MSChart1.Colum n =
    col;" "MSChart1.D ata = 3;".  However, I have about a 200 points and
    doing it this way takes the Chart about 20 seconds (it draws to the
    chart after each point is set).  I suspect the "MSChart1.Chart Data =
    myArr;" would be faster in this respect.
    >
    Another possbile solution, anyone know how to tell MSChart1 to not
    draw while I set all the points (Then I can just do an
    "MSChart1.Refre sh();" when I'm done setting points.
    >
    Thanks
    >
    NB
    I found the "MSChart1.Redra w = bool" property. By wrapping my code in
    that it cuts the inital loading from 20 seconds to about 9 seconds.
    Updating is pretty instant but with a small flicker which isn't a
    problem for me.

    Thanks NB

    Comment

    Working...