XAxisComponent
XAxisComponent API
- XAxisComponent.doActivate
- Returns
- void
XAxisComponent.doActivate(): void
This method is used to activate the chart and update the labels if there is a new data set or equivolume type. It subscribes to the chart type change, candles set subject, candles updated subject, and time zone change to generate new labels. It also subscribes to the x-axis scale change and canvas resize to recalculate the labels.
- XAxisComponent.getDrawer
- Returns
- XAxisTimeLabelsDrawer
XAxisComponent.getDrawer(): XAxisTimeLabelsDrawer
Returns the xAxisDrawer object.
- XAxisComponent.registerXAxisLabelsProvider
- Parameters
- provider: XAxisLabelsProvider
- Returns
- void
XAxisComponent.registerXAxisLabelsProvider(provider: XAxisLabelsProvider): void
You can add a custom labels provider for additional labels on XAxis (like for drawings)
- XAxisComponent.setVisible
- Parameters
- isVisible: boolean
- Returns
- void
XAxisComponent.setVisible(isVisible: boolean): void
Controls visibility of the x-axis
- XAxisComponent.setFormatsForLabelsConfig
- Parameters
- newFormatsByWeightMap: Record<TimeFormatWithDuration, string>
- Returns
- void
XAxisComponent.setFormatsForLabelsConfig(newFormatsByWeightMap: Record<TimeFormatWithDuration, string>): void
Set new config for x labels formatting
- XAxisComponent.isVisible
- Returns
- boolean
XAxisComponent.isVisible(): boolean
If visible, when you can see the x-axis on the chart