function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
John Upton 8John Upton 8 

Dynamic formatting of dashboards

I'm trying to create a dashboard where not only the data, but also the formatting is set dynamically. 

In my specific example, I have been asked to create a gauge (what I call a 'speedometer') type dashboard element which displays user data, but the data not only defines where the pointer will point to, but also values associated with Breakpoint 1, Breakpoint 2 and Maximum (where the colours start and stop). 

I've read some about Dynamic Dashboards and Wave Analytics, but haven't found anything which tells me how I can influence these values dynamically. Does anyone know if this possible and if so, can you point me in the direction of some documentation / forum post, so I can find out how? Thanks.
Best Answer chosen by John Upton 8
bob_buzzardbob_buzzard
You can't do this I'm afraid - gauge breakpoints are specified when you create the component and are static. If you need this capability, you'll need to create your own charts in Visualforce and include those in the dashboard. You can find out more about a Visualforce gauge chart at:

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_charting_appearance_gauge_charts.htm

All Answers

bob_buzzardbob_buzzard
You can't do this I'm afraid - gauge breakpoints are specified when you create the component and are static. If you need this capability, you'll need to create your own charts in Visualforce and include those in the dashboard. You can find out more about a Visualforce gauge chart at:

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_charting_appearance_gauge_charts.htm
This was selected as the best answer
John Upton 8John Upton 8
Hi Bob,

Thanks for the pointer. I have now created myself a visualforce guage chart to display my data. I can set the Maximum, Minimum and of course the actual value dynamically, and set the colours for the chart above and below the actual value> :) However, I am struggling with the breakpoints, so that I can have multiple colours on my gauge. Is this possible and if so, how?
I've played around with having a second line for 
<apex:gaugeSeries

referencing a different dataField in the list in my controller, but find that it either completely overrides the first line, or is seemingly ingored, depending on e.g. whether the donut size is bigger or smaller than in the first line.
John Upton 8John Upton 8
OK, trawling the forum I think I've found an answer: without going outside of Visualforce, this is not possible: http://salesforce.stackexchange.com/questions/15916/visualforce-gauge-with-breakpoints