Replies: 2 comments
-
You can set the color of the grid and labels to a more white or visible color if your background is black: https://www.chartjs.org/docs/master/axes/styling.html. An alternative is to to set the backgroundColor of the chart to be always white: https://www.chartjs.org/docs/master/configuration/canvas-background.html |
Beta Was this translation helpful? Give feedback.
-
The color of the background is not under my control and can change, just like GitHub's background preference.
That's an alternative that will always make the plot discernable at all times, but fits in less well in dark or dim background pages. |
Beta Was this translation helpful? Give feedback.
-
Plotting a chart.js plot on light background (like GitHub light) provides good results:
The same plot on a dark background (like GitHub dark), not so much:
The graph and tick labels as less well readable and the grid almost disappears.
(Example taken from xdoc.)
Perhaps a solution would be to set labels, grid lines etc. in
text-color
of the surrounding text, with some opacity.Beta Was this translation helpful? Give feedback.
All reactions