This topic is locked

Dynamic Min Max on Gauge Chart

8/17/2016 8:53:49 PM
ASPRunner.NET General questions
R
rascasse83 author

Hi
I have a gauge chart in ASPRunner.Net 8.1 to display a KPI.
the KPI "Target" value is held in the database, so i was wondering whether i could dynamically set the Min/Max thresholds of the Gauge Chart depending on value held in the database for that KPI ?
All i seem to be able to do is set an fixed min/max value, but this wouldn't work for us as each KPI has different targets.
Best
FT

Sergey Kornilov admin 8/24/2016

This sort of thing will be easier in ASPRunner.NET 9.0 where AnyChart API provides more options of chart customization. Check examples of chart modification here:

http://xlinesoft.com/phprunner/docs/chartmodify.htm
You can pass data from C#/VB.NET to ChartModify event using pageObject.setProxyValue function.
C# (BeforeDisplay event):

pageObject.setProxyValue("name", XSession.Session["UserID"]);


Javascript (ChartModify event):

alert(proxy.name);


This is how you can pass Min/Max thresholds to chart and update chart settings dynamically.