Linear Gauge > Adding trend points/zones |
|||||||||||||||||||||||||||||||||||||||||||||
The linear gauge allows you add the following trend elements on the chart:
Here we'll see how to add these and configure the same. |
|||||||||||||||||||||||||||||||||||||||||||||
Adding simple trend point | |||||||||||||||||||||||||||||||||||||||||||||
To add a simple trend point (say last year's customer satisfaction index as 79%), you'll need to add the following to XML: | |||||||||||||||||||||||||||||||||||||||||||||
<trendpoints> <point startValue='79' displayValue='Previous' color='666666' thickness='2' alpha='100' /> </trendpoints> |
|||||||||||||||||||||||||||||||||||||||||||||
Here, we've first added the <trendpoints> element, which can contain any number of trend-points for the chart. Now, for each trend point, you need to add a <point> element with startValue/endValue as the value and other cosmetic properties defined. The above trend point would show up on the chart as under: |
|||||||||||||||||||||||||||||||||||||||||||||
You can have the following properties for <point> element: |
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
The line can also be drawn as dashed one by setting: <point ... dashed='1' dashLen='3' dashGap='3' ..> This will result in: |
|||||||||||||||||||||||||||||||||||||||||||||
You can opt to show trend label below the gauge using: <point ... showOnTop='0' ...> This will result in: |
|||||||||||||||||||||||||||||||||||||||||||||
If you wish to increase the space between trend line and its value, you can set it in: <chart ... trendValueDistance='25' ..> (or a value in pixels) |
|||||||||||||||||||||||||||||||||||||||||||||
Showing trend-markers | |||||||||||||||||||||||||||||||||||||||||||||
For each trend point, you can also show a triangular marker using: <point startValue='79' displayValue='Previous' color='666666' useMarker='1' markerColor='F1f1f1' markerBorderColor='666666' markerRadius='7'/> This will result in: |
|||||||||||||||||||||||||||||||||||||||||||||
You can also add a tool tip to this marker using: <point ... markerTooltext='Previous year index: 79%' ...> This will result in: |
|||||||||||||||||||||||||||||||||||||||||||||
Creating trend-zones | |||||||||||||||||||||||||||||||||||||||||||||
You can also create trend-zone to represent a range of values, instead of a single value. Shown below is a simple XML: <point startValue='49' endValue='65' displayValue='Trend Zone' color='00CCFF' alpha='30' /> Here, we've added both startValue and endValue to create a trend zone. Also, we've specified the cosmetics. This will result in: |
|||||||||||||||||||||||||||||||||||||||||||||