Skip to content

Axis

Customize the time axis (bottom) and price axis (right). Both axes share the same properties — use the xAxis or yAxis prefix.

← Back to Custom Styles overview

Copy the property path into your setCustomStyles config. You only need to include the values you want to change.

Time axis (xAxis)

PropertyDescriptionTypeExample
xAxis.showShow or hide the time axisbooleantrue
xAxis.sizeHeight of the axis areanumber | 'auto''auto'
xAxis.axisLine.showShow the main axis linebooleantrue
xAxis.axisLine.colorColor of the main axis linecolor'#d0d0d0'
xAxis.axisLine.sizeThickness of the main axis linenumber1
xAxis.tickLine.showShow small tick marksbooleantrue
xAxis.tickLine.colorColor of tick markscolor'#DDDDDD'
xAxis.tickLine.lengthLength of tick marksnumber3
xAxis.tickText.showShow date/time labelsbooleantrue
xAxis.tickText.colorColor of date/time labelscolor'#76808F'
xAxis.tickText.sizeFont size of labelsnumber12
xAxis.tickText.familyFont family of labelsstring'Helvetica Neue'
xAxis.tickText.weightFont weight of labelsstring | number'normal'

Price axis (yAxis)

Same properties as the time axis — replace xAxis with yAxis.

PropertyDescriptionTypeExample
yAxis.showShow or hide the price axisbooleantrue
yAxis.sizeWidth of the axis areanumber | 'auto''auto'
yAxis.axisLine.showShow the main axis linebooleantrue
yAxis.axisLine.colorColor of the main axis linecolor'#d0d0d0'
yAxis.axisLine.sizeThickness of the main axis linenumber1
yAxis.tickLine.showShow small tick marksbooleantrue
yAxis.tickLine.colorColor of tick markscolor'#DDDDDD'
yAxis.tickLine.lengthLength of tick marksnumber3
yAxis.tickText.showShow price labelsbooleantrue
yAxis.tickText.colorColor of price labelscolor'#76808F'
yAxis.tickText.sizeFont size of labelsnumber12
yAxis.tickText.familyFont family of labelsstring'Helvetica Neue'
yAxis.tickText.weightFont weight of labelsstring | number'normal'

Example

typescript
chart.setCustomStyles({
  light: {
    xAxis: { axisLine: { color: '#d0d0d0' } },
    yAxis: { axisLine: { color: '#d0d0d0' } },
  },
})

Developers who need full TypeScript interfaces can use the type reference.