Philippe Rivière
Philippe Rivière
Here's a playground to develop tests: https://observablehq.com/@observablehq/auto-margins-1722
Computing all the ticks is probably more adequate, but it is also quite a bit more complicated, since the ticks are computed from the instantiated scales. I've tried to approximate...
I've implemented the new strategy. Still needs a bit of work: * ~~clean up the code~~ * ~~fix the two test cases mentioned above~~ * ~~keyword check on "auto"~~ (no...
I think this is good to go! Does it need documentation?
Yes I feel good about the result: the tests are all looking great and the only changes are improvements. I think the algorithm is correct. The implementation can certainly be...
One thing that bugged me is that monospaceWidth and defaultWidth are not aligned; maybe there's still time to change this by making monospace chars 60 instead of 100 — it...
There was still a bug with the aspectRatio option. Here's a "normal" scenario under which the ticks depend on the margins, when the chart has a set aspectRatio. Suppose that...
OK now it's fast in both examples (p3 and CSS4 + sRGB). (It is slower than the usual call to d3.rgb when there are more than 256 different colors.)
One thing that doesn't work here is the serialization to disk made by our unit tests; you can see the two new SVGs appear black (in this PR's preview on...
After investigation: * node-canvas does not support colors expressed as CSS4 strings (e.g. `color(display-p3 0 1 0.1)` is going to be black) * when a canvas prepared with the `display-p3`...