Temporal Charts
Temporal charts support specific configuration methods and parameters related to the time dimension of the data they display.
Time axis configuration
When working with charts that support displaying a timeline (usually a Temporal Evolution with an attribute byTime
set to true
), the x-axis can be customised to display the level of details that suits you best.
The following attributes can be used:
-
timeInterval
(optional, default: MILLISECOND) displays only the last value available for the time period selected. This allows you to display a result trend for the past year, with only the last of every month drawn on the chart (onlyLast="12" timeInterval="MONTH"
). The values allowed for this attribute areMILLISECOND
,SECOND
,MINUTE
,HOUR
,AM_PM
,DAY
,WEEK
,WEEK_SUNDAY
,WEEK_MONDAY
,SEMI_MONTH
,MONTH
,QUARTER
andYEAR
. Note that for Temporal Evolution with aBAR
renderer, this setting defines the width of the bar. -
timeIntervalAggregationType
(optional, default: AVG) defines how the values obtained for all versions within an interval are aggregated. The allows aggregation types are:-
MIN: minimal value
-
MAX: maximal value
-
OCC: number of data points
-
AVG: average value
-
DEV: standard deviation
-
SUM: sum of values
-
MED: median value
-
MOD: modal value
-
By default, the date used for each version is the actual date of when the analysis was run. However, you can override this date and specify the real date of an analysis in the UI using the Version Date field, or via the command line using the --versionDate parameter. Refer to the Command Line Guide for more details. |
Displaying planned versions
You can display future or past versions on a chart using the forecast
element on a measure, as shown below.
<chart type="TemporalEvolution" renderer="BAR" id="TE_BAR_FORECAST">
<measure color="GREEN" label="Lines of Code">LC
<forecast>
<version value="SLOC" timeValue="DATE(2016,06,30)" label="V7 forecast" />
<version value="600" timeValue="DATE(2016,07,31)" />
<estimatedVersion timeValue="DATE(2016,08,31)" />
<estimatedVersion timeValue="DATE(2016,09,30)" />
</forecast>
</measure>
</chart>
The forecast points on the chart can be:
-
Hard-coded values at a specific past or future date using
version
-
Dynamically computed values at a specific date in the future using
estimatedVersion
The forecast
element accepts the following attributes:
-
degree
(optional, default: 1) sets the degree of the polynomial extrapolation used to compute estimated values at a specific date. Supported values are:-
1 for linear
-
2 for quadratic
-
3 for cubic
-
-
minNb
(optional, default: 2) sets the minimum number of past values to take into account to estimate future values -
maxNb
(optional, default: 5) sets the maximum number of past values to take into account to estimate future values
When using forecast
with dynamically estimated future values, use the estimatedVersion
element with the following attributes:
-
timeValue
(mandatory) is a computation valid for the current artefact type that is used to position the version on a time axis. The result has to be a number of milliseconds since January 1st 1970. -
label
(optional, default: V(n+x)) is the label used to represent the version on the chart.
When using forecast
with hard coded values for, use the version
element with the following attributes:
-
value
(mandatory) is a computation valid for the current artefact type (same limitation as fordisplayOnlyIf
). -
timeValue
(mandatory) is a computation valid for the current artefact type that is used to position the version on a time axis. The result has to be a number of milliseconds since January 1st 1970. -
label
(optional, default: V(n+x)) is the label used to represent the version on the chart.
Displaying estimates for dynamically for the next 6 months is more efficient with chart where values are plotted according to when they were created on a time axis (see Time axis configuration) and can be done as shown in the following example: Figure 2. A rolling 6-month projection chart
|
Working with goals
On a Temporal Evolution, you can render goals graphically by defining a starting point, an end date and a value you want to reach.
This is done using the goal
element on your chart, and replaces the deprecated Temporal Evolution Line With Goal and Temporal Evolution Bar With Goal charts.
<chart type="TE" id="GOAL_EXAMPLE" byTime="true">
<dataset renderer="AREA">
<goal color="CYAN" alpha="100" label="My Objective">
<forecast>
<firstMeasureVersion id="LC" />
<version value="8000" timeValue="DATE(2014,10,01)" />
</forecast>
</goal>
</dataset>
<dataset renderer="LINE">
<measure color="BLUE" label="Line of Code">LC
<forecast>
<version value="SLOC" timeValue="DATE(2014,05,01)" label="V3" />
<version value="6666" timeValue="DATE(2014,06,01)" />
<version value="3333+4444" timeValue="DATE(2014,08,01)" />
</forecast>
</measure>
</dataset>
</chart>
In the example above, the first dataset (rendered as an AREA
) is used for the goal, while the second (rendered as a LINE
) is used for the display of the LC metric.
The goal
element supports the color
, label
and alpha
attributes as they are described in For measure and indicator elements.
It accepts a child forecast
element with one or more traditional version
elements (as described in Displaying planned versions), as well as an optional firstMeasureVersion
attribute that will define the starting point to draw the goal.
In the example above, the goal is rendered the first time that the metric LC has a value and is drawn using the value of this metric at this point in time.
The goal to reach is hard-coded to 8000 on October 1st 2014, but you could use any metrics from you model to generate dynamic values.
Using goals, you can easily draw burn down charts for you agile projects. Figure 4. A burn down chart of remaining tasks in a sprint
In this example, we start drawing the diagonal when NUM_TASKS first has a value for the project, and set the objective to reach zero by dynamically computing the end of the sprint based on the sprint start date and a constant that defines the sprint length. |