User Guide
Reference
Examples
Download
Github

Scale Types

The <scale-type> options can be used to control the projection of data and to define categorical scales. To control where ticks and labels are placed on a scale, please see the Scale Type page. To control the formatting of scale labels, please see the Formatters page.

List of <scale-type> values

linear

A simple linear scale from min to max.

linear

Example: charts-reference/scale_linear:


logarithmic

A logarithmic scale. Default base is 10.

log
log(<base>)
logarithmic
logarithmic(<base>)

Example: charts-reference/scale_logarithmic:


categorical

A categorical scale. The <data-ref> argument is optional and should contain the list of valid categories.

categorical
categorical(<data-ref>)

Example: charts-reference/scale_categorical:


inverted

A modifier that inverts the scale. Can be used in conjunction with other scale types.

inverted
invert

Example: charts-reference/scale_inverted:

Edit this page on GitHub