STEM help

5.1.3 Smart labelling for time-based charts

Writing fresh code to draw graphs in HTML for eSTEM prompted a review of how graphs are presented, and specifically how the time axis can be labelled most effectively.

From STEM 7.4 onwards, the year labels are consistently spaced and easier to read without the unnecessary clutter of labels for the quarters and months. The tick marks and gridlines for years are more prominent, and the sub-annual vertical gridlines are classified as ‘minor’ and drawn with a lighter shade of grey, so that the years stand out more clearly and the sub-annual periods can be readily inferred.

For a column chart, when you have four columns for successive quarters in a year, the year label appears midway between the four columns, exactly where it will also be if you switch to showing consolidated annual values and the four original columns are replaced by a single column for the year.

On a line chart showing only annual values (e.g., end-of-period connections), the year label was originally shown under the value, even though you might regard ‘the year’ as being everything between the previous end-of-year value and the next. This becomes more apparent when you add quarterly values and so the year label is now placed ‘mid-year’, which is under the (end of) Q2 value if quarterly values are shown.

In simple terms this means that the year labels come between the major grid lines which mark the ends of each year. It also means that Y0 is not shown on a line chart because the first label will be Y1 under the portion of the chart which shows the evolution of the data in from the end of Y0 to Y1. Y0 data is not shown on column charts by default. (Typically one is only interested in the movements, revenues and costs from the beginning of Y1 onwards, and in Y0 only as a starting position for line charts.)

The charts in the figure below show how charts are presented from STEM 7.4 onwards compared with STEM 7.3, for a run period of ten years, including five years in quarters, starting from 2006:

Time-axis tick marks, gridlines and labelling compared between STEM versions 7.3 and 7.4

The only exception to this economical labelling is when there is likely to be room to accommodate more detail, if either the number of quarters is ‘less than ten’ in total, or the number of months is ‘not much bigger than ten’. In other words, the time-axis labels for individual quarters will be shown in STEM 7.4 only if there are at most two years on a graph, and labels for months only if there is just one year.


© Implied Logic Limited