+ Start a Discussion
MWorldMMMWorldMM 

Fuel Gauge in VF Page

I would like to use the Fuel Gauge dashboard component in a VF page that will placed into a layout, Can I do this? The gauge would be driven by a controller that calculates how many fields on the page have been filled out and would display at the top of this page. The page itself would be stock except for the addition of the VF page containing the gauge.

 

I can do something like this using the Google Chart API but their gauge just does not look right.

 

Any ideas?

sfdcfoxsfdcfox

The chart renderer in Salesforce isn't available for VF, so that's out. If Google Charts doesn't look right, you're pretty much stuck with one of two solutions:

 

1) Use a canvas or SVG element (not compatible with all browsers).

2) Roll your own graphics output engine on a third-party server, such as your own company's website. PHP has a library to do stuff like this easily.

 

You might also look at jQuery or another JavaScript library that might be able to render these types of charts in a platform-independent manner.