<apex:gaugeSeries> Component in Visualforce PageThe <apex:gaugeSeries> is another important component for defining the data series indicating progress along with the specific metric. At a minimum, you must specify the fields in the data collection to use as labels and value pairs for the gauge level to be shown. The readability of the gauge chart aids when we set meaningful values for the minimum and maximum along with the associated <apex: axis>. The type of values must be "gauge". The <apex: gaugeSeries> component must be enclosed within the <apex: chart> component. The <apex: gaugeSeries> component has the following attributes: 1. colorSetThe colorSet is a string-type attribute that defines a set of color values. These color values are used as the gauge level fill colors. The colors are defined as a comma-separated string in hexadecimal format. Syntax: 2. dataFieldThe dataField is a string-type attribute that defines a field in the records of the chart data. By using dataField, the data value for the gauge level is retrieved. Syntax: 3. donutThe donut is an integer-type attribute representing the radius of the hole to be placed in the centre of the gauge chart as a percentage of the radius of the gauge. By default, its value is set to 0, which creates a gauge chart without a hole, i.e., a half-circle. Syntax: 4. highlightThe highlight is a Boolean-type attribute that specifies whether each gauge level should be highlighted or not when the mouse pointer passes over it. The boolean value true is set as the default value for this attribute. Syntax: 5. idThe id is a string-type attribute, i.e., a unique identifier that allows this component to be referenced by other components on the page. Syntax: 6. labelFieldThe labelField is a string-type attribute that defines a field in the records of the chart data. By using lableField, the label value for the gauge level is retrieved. The name is set as the default value for this attribute. Syntax: 7. needleThe needle is a Boolean-type attribute used to specify whether we need to show the gauge needle or not. The boolean value false is set as the default value for this attribute. Syntax: 8. renderedThe rendered is a Boolean type attribute that specifies whether the char series need to be rendered in the chart or not. The boolean value true is set as the default value for this attribute. Syntax: 9. rendererFnThe rendererFn is a string type attribute used to specify the JavaScript function. The function overrides how the gauge elements are rendered. Syntax: 10. tipsThe tips is a Boolean type attribute used to specify whether we need to display a tooltip for the gauge level or not when the mouse pointer passes over it. The boolean value true is set as the default value for this attribute. Syntax: Let's take an example to understand how we can use this component to display a chat on the Visualforce page: ApexGaugeSeriesExample.vfp ApexGaugeSeriesController.apxc Output |