Hello all,
I'm using ThemeService to change the colors of some chart elements when the user switches between light and dark.
When the user selects the dark theme I need to change the font colors to white for all charts, so I'm using ThemeService to apply the colors globally. However, when I change the tick color, the doughnut chart starts displaying the X and Y axes. I haven't found a way to apply this only to some chart types.
What's the best way to get around this?
See below my implementation:
const overrides: ChartOptions = {
elements: {
arc: {
borderWidth: 0
}
},
scales: {
x: {
ticks: {
color: '#fff'
}
},
y: {
ticks: {
color: '#fff'
}
}
},
plugins: {
legend: {
labels: {
color: '#fff'
}
}
}
}
this.chartTheme.setColorschemesOptions(overrides)
