on 07-06-2007 2:09 PM
Hi all,
I am trying to set the chart type property (XBAR, MEDIAN etc..) of iSPC chart dynamically from my html page.
This is the code that I used.
var chart_obj = document.iSPCChart.getChartObject();
chart_obj.setChartType("MEDIAN");
iSPCChart is my Applet name.
But the code doesn't seem to work.
The chart is always of the type that I have set in the iSPC display template.
Can someone help me in this regard?
Thanks a lot.
Regards,
M.Subathra
Try using resetChartType("MEDIAN") instead of setChartType.
- Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
M,
Even though that method shows up in the script assistant and the docs it really doesn't work.
Just swap out the display template for one saved with the desired type:
document.iSPCChart.setDisplayTemplate("Folder/MedianChart");
document.iSPCChart.updateChart(true);
With all of the alarm rules, colors, limits, settings, etc. it is not likely that you will have the same view (display template) that applies to every SPC chart type.
There is also a predelivered example of an SPC Chart that uses an iframe and an irpt to dynamically pass the chart type (along with other settings) you can reference: http://<servername>/Lighthammer/Samples/SPC/Servers.irpt
Regards,
Jeremy Good
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try a
document.<applet name>.refresh();
after setting the chart type?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.