Skip to main content

ChartStyleOptions

Basic style options for a chart.

Properties​

backgroundColor?​

optional backgroundColor: string

Background color for chart. Defaults to #FFFFFF. You can also use the .vjs-chart-background css class to set this.


crosshairColor?​

optional crosshairColor: string

What color to draw crosshairs


gridLineColor?​

optional gridLineColor: string

What color to draw gridlines. Defaults to #AAAAAA.


labelColor?​

optional labelColor: string

Color for labels, defaults to #000000. Can be overridden in axis definitions via the labelColor property.


labelColorGenerator()?​

optional labelColorGenerator: (v, idx) => string

Optional function invoked to compute a custom color for a given label

Parameters​

v​

number

idx​

number

Returns​

string


legendBackgroundColor?​

optional legendBackgroundColor: string

Background color for the legend.


legendOutlineColor?​

optional legendOutlineColor: string

What color to draw as outline for the legend


legendOutlineWidth?​

optional legendOutlineWidth: number

Width of the legend outline


plotBackgroundColor?​

optional plotBackgroundColor: string

Background color for chart's plot area. Defaults to being the same as the value calculated for backgroundColor. You can also use the .vjs-chart-plot-background css class to set this.