plot
plot copied to clipboard
Dark mode
Dark mode almost works: the use of currentColor for stroke and fill is solving 90% of the problem.
In some cases, though, it's not ideal:
- in cars-parcoords we use white to detach the text against the background. Using "fill: currentColor; filter: invert(1)" would work.
- in metroUnemploymentRidgeline the areas are filled with #ccc, which could be replaced by "fill: currentColor; filter: invert(20%);"
- and more.
Adding support for the filter attribute would help a lot.
A smaller issue is that hard-coded .plot background {#fff}, which I had to override in bf7b99fbe9a77052008c38b5e50a390618c8fad9
We support dark mode in our documentation and I even tweeted about it:
https://twitter.com/mbostock/status/1653069773645938689
Maybe we can close this issue? Maybe the last remaining issues are the default white background #1434 and the default white marker stroke #1463 but both issues can be worked around with a stylesheet.
At some point we'll have to consolidate the documentation, but in terms of support I think we have all we need.