Skip to content

Plot axis configuration

Axis ordering and scaling for a plot. Shared by both plot widgets: "Plot" reaches it as and "Plot View" as PlotViewOptions.Axes, so one set of options covers both. Read client-side by plotAxesConfig / plotCategoryArray / plotValueAxisConfig in UI/src/js/portal/components/plot.js — keep the member names and option strings in step with them. This is what makes two plots agree: the order a chart's categories arrive in follows the data, so two plots over the same values can lay them out differently. Choosing an order here pins it.

Reached from Axes on Plot view options and Axes on Plot layout configuration.

Settings

Category order

Type
One of a list
Default
Automatic

The left-to-right order of the categories on the label axis. 'Automatic' keeps the order the data arrives in, which can differ between two plots — choose anything else to make several plots line up. Only applies to a text axis; a date axis always runs chronologically. Default: Automatic.

  • Automatic
  • Alphabetical
  • Alphabetical (Z-A)
  • By value
  • By value (high to low)
  • Custom

> Custom category order

Type
List of text

Shown when Category order is Custom.

The categories in the order they should appear, written exactly as they appear on the axis. Categories in the data that are not listed here follow, in the order the data arrives in.

Fill empty periods

Type
Yes or no
Default
True

Keeps a slot on the axis for a period that has no data, so a gap looks like a gap. This matters for week grouping: weeks sit on a text axis, so without this a jump from week 3 to week 9 is drawn as two neighbouring bars and reads as consecutive weeks. Turn it off for a compact chart of only the periods that have data. Has no effect when the categories are not periods, or when the category order is 'By value' or 'Custom'. Default: yes.

Hide rows with no date

Type
Yes or no
Default
True

Leaves out the objects whose date property is empty when the plot is grouped by a date. They have no place on a time axis, so they are otherwise parked at one end as a '(no value)' column that distorts the scale. Turn this off to keep them as their own column. Only applies to a date-grouped plot — on an ordinary text axis '(no value)' is a normal category and is always kept. Default: yes.

Series order

Type
One of a list
Default
Automatic

The order of the series in the legend, in a stack, and within each bar group. Default: Automatic.

  • Automatic
  • Alphabetical
  • Alphabetical (Z-A)
  • By total
  • By total (high to low)
  • Custom

> Custom series order

Type
List of text

Shown when Series order is Custom.

The series names in the order they should appear. Series not listed here follow. Listing a series here also fixes which color it gets, so it keeps that color in every plot that lists it — the alternative to pinning it with a color rule on the theme.

Value axis ticks

Type
One of a list
Default
Automatic

'Automatic' lets the chart choose. 'Whole numbers only' picks the smallest whole-number spacing that keeps the gridlines readable — use it for counts, so a chart that only reaches 3 does not get gridlines at 0.5. 'Fixed step' forces an exact spacing. Default: Automatic.

  • Automatic
  • Whole numbers only
  • Fixed step

> Tick step

Type
Number

Shown when Value axis ticks is Fixed step.

The distance between gridlines on the value axis, for example 10, 100 or 2.5.

Value axis minimum

Type
Number

Optional. Pins the bottom of the value axis — set 0 to always start at zero. Leave empty to fit the data.

Value axis maximum

Type
Number

Optional. Pins the top of the value axis.

Value label format

Type
Text

Advanced. A d3 number format for the value-axis labels, for example ',d' for whole numbers with a thousands separator, '.1f' for one decimal, or '.0%' for percentages. Leave empty for the default.

Generated from CtrlPortals 3.26.9.53.