Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > MSChart and JavaScript

Reply
Thread Tools

MSChart and JavaScript

 
 
NvrBst
Guest
Posts: n/a
 
      01-04-2008
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
 
Reply With Quote
 
 
 
 
NvrBst
Guest
Posts: n/a
 
      01-04-2008
On Jan 4, 12:26*pm, NvrBst <(E-Mail Removed)> wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MSChart Memory Leak luigi.corrias@gmail.com ASP .Net 0 08-01-2009 01:42 AM
MSChart in ASPX ckkwan@my-deja.com ASP .Net 1 06-22-2007 08:26 AM
Can i display a COM MSChart object in an ASP page? John Blair ASP .Net 2 01-12-2005 06:35 PM
MSChart won't work =?Utf-8?B?X0RvdWc=?= ASP .Net 0 01-07-2005 04:11 PM
MSChart in .NET environmnet arc ASP .Net 1 03-04-2004 02:24 AM



Advertisments