By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,143 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,143 IT Pros & Developers. It's quick & easy.

MSChart and JavaScript

P: n/a
I can't seem to set the "MSChart1.ChartData = 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.Row = row;" "MSChart1.Column =
col;" "MSChart1.Data = 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.ChartData =
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.Refresh();" when I'm done setting points.

Thanks

NB
Jan 4 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Jan 4, 12:26*pm, NvrBst <nvr...@gmail.comwrote:
I can't seem to set the "MSChart1.ChartData = 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.Row = row;" "MSChart1.Column =
col;" "MSChart1.Data = 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.ChartData =
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.Refresh();" when I'm done setting points.

Thanks

NB
I found the "MSChart1.Redraw = 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
Jan 4 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.