Cartesian Chart Customisation
In addition to the general chart customisations, you can also use these customisations for cartesian charts, which have an x- and y-axis.
Example: Cartesian Chart Customisations
The example below changes all available styling options. The styling options are exaggerated to demonstrate each option rather than to produce a chart that looks nice!
Charts can use different types of axes to present data in different ways. The grid will select best-guess defaults based on the type of chart,
the column chart data types, and the data being plotted. If required,
you can override the default axis types for line and scatter/bubble charts by setting the
type in the relevant
There are three types of axis available:
CategoryThis is a discrete axis used for showing data based on a collection of categories. It is used automatically for
'category'columns. If no category column is selected and this axis is used, default category names will be created using an ascending numeric sequence.
NumberThis is a continuous axis used for plotting numerical values. It is used automatically for
'series'columns that contain
TimeThis is a continuous axis used for plotting date/time values. It is used automatically in line and scatter/bubble charts for columns that contain
Datevalues. Use of this type of axis allows the creation of time series charts.
For time axes, a format string can be provided, which will be used to format the data for display as axis labels. The format string may contain the following directives, which reflect those from Python's strftime:
%a- abbreviated weekday name.*
%A- full weekday name.*
%b- abbreviated month name.*
%B- full month name.*
%c- the locale’s date and time, such as
%d- zero-padded day of the month as a decimal number
%e- space-padded day of the month as a decimal number
[ 1,31]; equivalent to
%f- microseconds as a decimal number
%H- hour (24-hour clock) as a decimal number
%I- hour (12-hour clock) as a decimal number
%j- day of the year as a decimal number
%m- month as a decimal number
%M- minute as a decimal number
%L- milliseconds as a decimal number
%p- either AM or PM.*
%Q- milliseconds since UNIX epoch.
%s- seconds since UNIX epoch.
%S- second as a decimal number
%u- Monday-based (ISO) weekday as a decimal number
%U- Sunday-based week of the year as a decimal number
%V- ISO 8601 week number of the year as a decimal number
%w- Sunday-based weekday as a decimal number
%W- Monday-based week of the year as a decimal number
%x- the locale’s date, such as
%X- the locale’s time, such as
%y- year without century as a decimal number
%Y- year with century as a decimal number.
%Z- time zone offset, such as
%%- a literal percent sign (%).
Directives marked with an asterisk (*) may be affected by the locale definition.
%U, all days in a new year preceding the first Sunday are considered to be in week 0.
%W, all days in a new year preceding the first Monday are considered to be in week 0.
%V, per the strftime man page:
In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. Week 1 is the first week where four or more days fall within the new year (or, synonymously, week 01 is: the first week of the year that contains a Thursday; or, the week that has 4 January in it).
% sign indicating a directive may be immediately followed by a padding modifier:
- (nothing) - disable padding
0for all directives except
%e, which defaults to
Example: Time Series Chart
This example shows how a time series chart can be created. It demonstrates explicitly setting the axis type to
but you can also remove this and the chart will still use the time axis as it automatically detects the axis type from the data in the