Skip to content

Titles & chrome

Axis chrome is everything that is not the tick values themselves: titles, axis line, tick marks, and label visibility.


Axis titles

Each side has an axisTitle block (same multiline text shape as chart title furniture). Defaults are visible: false.

js
axes: {
  left: {
    axisTitle: {
      visible: true,
      text: 'USD millions',
      fontSize: 11,
    },
  },
}

text accepts plain strings or inline HTML (<font>, <b>, …) like title / subtitle.

Rotation

Rotation follows the physical side:

SideDefault title rotation
left−90° (reads up the axis)
right+90°
top / bottom0° (upright)

Horizontal charts put the value title on bottom (upright) and the category title on left (rotated). You usually do not need to set rotation by hand.

When to use a title vs a format

  • Prefer numberFormat prefix/postfix for $, %, × on tick labels
  • Use axisTitle for longer unit lines (“USD millions, FY25”) that would clutter every tick

Visibility

FieldRole
enabledAxis participates in layout / scales (secondary starts false)
visibleAxis line (and chrome) drawn
labels.visibleTick / category labels

Range axes (primaryRange, secondaryRange) can be hidden as a role. The domain axis cannot be removed as a role – hide labels instead if needed.

Bar Mekko defaults primaryRange.visible: false (totals and domain labels without a value axis line). Set visible: true to show the value axis line.


Tick marks & axis line

js
axes: {
  left: {
    axisColor: '#666666',
    axisWidth: 1,
    tickMarks: { visible: true }, // primary/secondary default true; domain default false
  },
}
FieldNotes
axisColor / axisWidthAxis line stroke
tickMarks.visibleSmall ticks at label positions

Label fonts

Under labels:

js
labels: {
  visible: true,
  fontSize: 12,
  fontFamily: 'Arial',
  fontColor: 'black',
  distanceFromAxis: 8,
}

House-style tools may rewrite face/color inside axisTitle.text HTML when applying brand fonts.


Recipe: titled currency axis

js
axes: {
  left: {
    labels: {
      preferredTickInterval: 50,
      numberFormat: {
        mode: 'custom',
        customFormat: {
          prefix: '$',
          postfix: '',
          decimalPlaces: 0,
          forceDecimals: false,
          thousandSeparator: ',',
          decimalSeparator: '.',
          signDisplay: 'auto',
          scaleDown: 0,
        },
      },
    },
    axisTitle: { visible: true, text: 'Revenue' },
    gridlines: { visible: true, dashArray: '' },
  },
}

See Currency ticks sample.

Developer documentation for ChartBuddy Embed · Not the end-user Help Center · Help Center