The linear gauge in the FusionCharts Suite XT can act as an input control, allowing users to visually drag and change the value of pointer. Once the value is updated, it can be retrieved from the chart using client-side JavaScript events.
In this section, you will be shown how you can:
- Convert a normal linear gauge into an editable one
Converting a Normal Linear Gauge into an Editable Gauge
A normal linear gauge can be converted into an editable one looks like this:
Given below is a brief description of the attribute used to create an editable gauge:
Attribute Name | Description |
---|---|
editMode |
It is used to specify whether the gauge will be rendered as editable. Setting this attribute to 1 will render an editable gauge, setting it to 0 (default) will render a normal gauge. If a gauge has multiple pointers and all have them have to be made editable, the |
The data structure needed to convert a normal gauge into an editable one looks like this:
Method used to Create Editable Gauges in the Previous Versions
For users who have been using the previous versions, you this a brief recap of how to create an editable gauge.
Once the user has changed the value of the gauge, the gauge automatically calls the FC_ChartUpdated(DOMId)
JavaScript function.
You will need to define this method in your HTML page and then write the JavaScript code to retrieve the data using getData(index)
or getDataForId(id)
method.
To look at the HTML + JavaScript code required to retrieve data from the gauge when a user changes the value, click here.
There! You have now seen how you can create and configure an editable linear gauge from a normal linear gauge.