Brian Maring Report post Posted February 1, 2010 Is there any way to get the color range along with the selected value of a pointer in a linear gauge? Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted February 1, 2010 Hi Brian, Could you please specify the issue a bit elaborately? Also, please refer to the link below for the detailed information on the XML attributes of a Linear Gauge. Ref.- http://www.fusioncharts.com/widgets/docs/Contents/Linear_XML.html Awaiting your reply. Share this post Link to post Share on other sites
Brian Maring Report post Posted February 1, 2010 The JavaScript API includes methods for getting the value of a pointer. Is it also possible to use JavaScript to find which ColorRange it is located in? Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted February 1, 2010 Hi Brian, The JavaScript API includes methods for getting the value of a pointer. Is it also possible to use JavaScript to find which ColorRange it is located in? Please try customizing your code using JavaScript, so that the pointer returns the color-range and not the value. Share this post Link to post Share on other sites
Brian Maring Report post Posted February 1, 2010 how? Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted February 2, 2010 Hi Brian, In case you know the value of the color-range, please try creating your own logic to get color-range as the output. Share this post Link to post Share on other sites
Brian Maring Report post Posted February 3, 2010 Is there a better way to do this? I write the logic for the chart in PHP. I would have to write the logic for getting the color range in JavaScript. I change the logic around quite a bit. It is not the best idea to constantly update parallel logic in both PH and JavaScript. Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted February 3, 2010 Hi Brian, Could you please send us the sample of the codes that you are using? Awaiting your reply. :hehe: Share this post Link to post Share on other sites
Brian Maring Report post Posted February 4, 2010 I'd prefer not to. Let's just say that I have a rather sophisticated PHP program using MySQL queries to calculate the color ranges. I don't want to have to replicate the logic in JavaScript. Share this post Link to post Share on other sites
Guest Madhumita Report post Posted February 5, 2010 Hi Brian, I am afraid, as of now, you can not retrieve the color range for the selected value of the pointer. There is no native support for this. But, there is always a way with will. Hack! The linear gauge ( as well all charts and gauges in FusionWidgest/FusionCharts pack) being a client side component at the end of the day, allows only JavaScript to interact with it to retrieve values from it. You can not do this directly from PHP once the chart is rendered at the client side browser. STEPS: The chart allows you to retrieve the XML from it using getXML() in JavaScript as string. Using String manipulation/RegularExpression you can retrieve the ranges from the XML. Using JavaScript you can get the value. Now, you can check whether this value falls under which range and work accordingly. Please let me know, if this can cater to your needs. Share this post Link to post Share on other sites