cancel
Showing results for 
Search instead for 
Did you mean: 

Set iChart Pen Max / Min Ranges

Former Member
0 Kudos

I need to set the Max and Min Ranges for the pens in an iChart using Javascript in a web page. I can use getEffectiveMaxRange(PENNUMBER) to get it OK, but I can't see a way to set it.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Som / Jeremy,

Thanks for that, I have what I wanted to do working nicely now. The Script Assistant is a bit confusing here, because the get/setMaxRange methods show with INDEX, not PENNUMBER.

It's interesting that I couldn't get the updateChart(false) to refresh the applet on the web page when I tried running it on the applet's update event. I have used that event in the past to run iCommands and update things like custom labels in the applet. But for some reason it wouldn't work here. It ran fine when I moved the javascript out of the update event and just ran it after the normal updateChart(true).

Regards,

Bill

jcgood25
Active Contributor
0 Kudos

Bill,

In addition to setting the MinRange and MaxRange values as Som indicated, you will also need to make sure that none of the Global settings or Auto Scaling are enabled, since these will override individual pen range values. You will also want to do a document.APPLETNAME.updateChart(false); after setting the pen values as desired.

Regards,

Jeremy

Former Member
0 Kudos

Northup

What about <b>document.<MyApplet>.getChartObject().setMaxRange(PENNUMBER,NEWVALUE);

Regards

Som