phibr0 / obsidian-charts

Charts - Obsidian Plugin | Create editable, interactive and animated Charts in Obsidian via Chart.js
https://charts.phib.ro/
GNU Affero General Public License v3.0
568 stars 26 forks source link

Default color for grid lines and axes border #42

Closed kepano closed 2 years ago

kepano commented 2 years ago

It would be great if the colors for charts could be themed. It seems that by default they use the borderColor which I couldn't find a setting for.

https://www.chartjs.org/docs/latest/general/colors.html

phibr0 commented 2 years ago

I will look into it. I wanted to make using the colors set in the settings easier when using the API anyway

phibr0 commented 2 years ago

Okay, the borders/grids are now using --background-modifier-border and the Chart colors are also themable via CSS (maybe you want to add something in Minimal there :smile:) as long as this setting is turned on:

image

One can then use the following css variables:

--chart-color-1: #ff00ff;
--chart-color-x: rgba(255, 123, 123, 0.8);
kepano commented 2 years ago

Awesome! Thanks!

kepano commented 2 years ago

Oops one last request if possible...

Is it possible to make the color variable themeable? I believe this is the one that is used for the label color on axes. I think this one should use --text-muted

phibr0 commented 2 years ago

Oooh I think I forgot that one, will add it.