FusionCharts Forum: get color range from linear gauge - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

get color range from linear gauge

#1 User is offline   Brian Maring 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 70
  • Joined: 02-February 09

Posted 01 February 2010 - 06:19 PM

Is there any way to get the color range along with the selected value of a pointer in a linear gauge?
0

Other Replies To This Topic

#2 User is offline   Basundhara Ghosal 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2459
  • Joined: 15-September 09

Posted 01 February 2010 - 11:17 PM

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. :(

Regards,

Basundhara Ghosal

Follow us on Twitter :D
0

Other Replies To This Topic

#3 User is offline   Brian Maring 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 70
  • Joined: 02-February 09

Posted 01 February 2010 - 11:22 PM

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?
0

Other Replies To This Topic

#4 User is offline   Basundhara Ghosal 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2459
  • Joined: 15-September 09

Posted 01 February 2010 - 11:37 PM

Hi Brian,

Quote

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.

Regards,

Basundhara Ghosal

Follow us on Twitter :D
0

Other Replies To This Topic

#5 User is offline   Brian Maring 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 70
  • Joined: 02-February 09

Posted 01 February 2010 - 11:46 PM

how?
0

Other Replies To This Topic

#6 User is offline   Basundhara Ghosal 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2459
  • Joined: 15-September 09

Posted 02 February 2010 - 12:17 AM

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.

Regards,

Basundhara Ghosal

Follow us on Twitter :D
0

Other Replies To This Topic

#7 User is offline   Brian Maring 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 70
  • Joined: 02-February 09

Posted 03 February 2010 - 05:29 PM

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.
0

Other Replies To This Topic

#8 User is offline   Basundhara Ghosal 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2459
  • Joined: 15-September 09

Posted 03 February 2010 - 11:10 PM

Hi Brian,

Could you please send us the sample of the codes that you are using?

Awaiting your reply. :hehe:

Regards,

Basundhara Ghosal

Follow us on Twitter :D
0

Other Replies To This Topic

#9 User is offline   Brian Maring 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 70
  • Joined: 02-February 09

Posted 04 February 2010 - 05:46 PM

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.
0

Other Replies To This Topic

#10 User is offline   Madhumita 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1434
  • Joined: 04-September 09

Posted 05 February 2010 - 01:30 AM

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.

Regards,
Madhumita Chakraborty

Follow us on Twitter :)
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic