Using Datasets and Renderers
Datasets are used to apply different rendering settings to different sets of measures in a chart. Each dataset can use its own axis configuration.
<chart type="TE" id="DATASETS_EXAMPLE">
<dataset renderer="LINE" rangeAxisId="AXIS_RAW">
<measure color="BLUE" alpha="200" label="Source Line of Code">SLOC
<forecast>
<version value="7777" timeValue="DATE(2014,08,01)" label="V3" />
</forecast>
</measure>
</dataset>
<dataset renderer="BAR" rangeAxisId="AXIS_KLOC">
<measure color="ORANGE" alpha="200" label="Line of Code">LC
<forecast>
<version value="9999" timeValue="DATE(2014,08,01)" label="V3" />
</forecast>
</measure>
</dataset>
<rangeAxis id="AXIS_RAW" label="LC" color="BLUE" />
<rangeAxis id="AXIS_KLOC" label="SLOC (KLOC)" color="ORANGE" />
</chart>
There are 7 basic types of renderers. Each one has can be prefixed with the STACKED_ modifier to stack data series on top of each other, and suffixed with the _100 modifier that displays data series as percentages:
BAR
Figure 2. BAR
|
Figure 3. STACKED_BAR
|
Figure 4. STACKED_BAR_100
|
LINE
Figure 5. LINE
|
Figure 6. STACKED_LINE
|
Figure 7. STACKED_LINE_100
|
STEP
Figure 8. STEP
|
Figure 9. STACKED_STEP
|
Figure 10. STACKED_STEP_100
|
SPLINE
Figure 11. SPLINE
|
Figure 12. STACKED_SPLINE
|
Figure 13. STACKED_SPLINE_100
|
AREA
Figure 14. AREA
|
Figure 15. STACKED_AREA
|
Figure 16. STACKED_AREA_100
|
AREA_STEP
Figure 17. AREA_STEP
|
Figure 18. STACKED_AREA_STEP
|
Figure 19. STACKED_AREA_STEP_100
|
AREA_SPLINE
Figure 20. AREA_SPLINE
|
Figure 21. STACKED_AREA_SPLINE
|
Figure 22. STACKED_AREA_SPLINE_100
|
The dataset
element accepts the following attributes:
-
renderer
(optional, default: differs according to the type of chart) allows specifying the type of rendering for the data series -
rangeAxisId
(optional) allows providing a reference to an axis configuration element
Chart axes can be defined using the rangeAxis
element, which accepts the following attributes:
-
id
(mandatory) The configuration identifier (referred to by adataset
element) -
label
(optional, default: the measure name) The label to be displayed on the axis -
min
(optional, defaults to an automatic value) is the minimum boundary for the axis. This attribute can be specified as a value or as a computation. -
max
(optional, defaults to an automatic value) is the maximum boundary for the axis. This attribute can be specified as a value or as a computation. -
visible
(optional, default: true) allows hiding a vertical axis when set to false -
hideTickLabels
(optional, default: false) allows hiding values on vertical axes when set to true -
inverted
(optional, default: false) reverses the order of values on the axis when set to true. -
location
(optional, default: left for vertical charts, bottom for horizontal charts) allows defining where around the chart the axis is drawn. Allowed values are: left, right, bottom and top. -
color
(optional, default: automatically assigned) sets the colour used to draw the scale.Working With Colours -
type
(optional, default: NUMBER) defines how the axis is represented. Accepted values are:-
NUMBER to display numerical values
-
SCALE to plot the axis with the associated scale levels of an indicator (see
scaleId
below)
If you are looking to display dates on your axes, simply add a
milestoneHistory
element to your chart, as described in Displaying milestone date changes. -
-
numberFormat
(optional, default: usually number) allows customising the number format when usingtype="number"
. The accepted values are as follows:-
NUMBER to display a number (formatted according to the browser’s locale)
-
PERCENT to display a percentage
-
INTEGER to display a number with no decimals
-
The
|