0

I have to create a Target report and I am planning to use Gauge Chart for the purpose. The tricky point is that the Gauge breakpoints have to be derived from a formula field. Is it possible using Visualforce?

Thanks for Help.

1

A good place to start will be using google charts :

https://developer.salesforce.com/page/Using_Formulas_and_Google_Charts_to_Visualize_Data

2
  • Thanks Yuval, can the dashboard filter be passed to components I build using Google charts?
    – Vandana
    Apr 10 '15 at 2:19
  • you can pass any parameters you would like using the API (Use your formula fields as the parameters) just like the example link.
    – sfdx bomb
    Apr 24 '15 at 9:30
1

If you use visualforce you cannot have breakpoints like in a standard gauge chart component. You can only set the min and the max via the vf page. When you set the max Salesforce automatically sets 10 evenly spaced out points that divides the max and the min. Then your needle or the data attribute is what fills the gauge to your amount.

So it looks something like this:

VF Gauge

If you want to get fancier than that, you could try using Google charts that requires some java, I didn't go that route because it was a bit too advanced for me.

I worked through a bunch of gauge vf pages last month. If you scroll through my past questions there is a lot of code examples on how I did it that you could glean some information.

This post describes using the Google chart: Visualforce Gauge with breakpoints

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.