d3 / d3-axis

Human-readable reference marks for scales.

Home Page:https://d3js.org/d3-axis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Canvas rendering?

mbostock opened this issue · comments

It wouldn’t be as configurable as SVG rendering, since you wouldn’t be able to apply a stylesheet or perform post-selection; and I definitely wouldn’t want to open the door to a million configuration options. (You can always overlay SVG on top of Canvas if you want to customize the appearance.)

Would probably be implemented as axis(context) rather than axis(selection).

Punting on this for now. It would be feature-poor compared to SVG (no transitions, no stylesheets, no post-selection), and thus probably better to think about as a separate module.

I came across this nice example by @syntagmatic that shows how SVG axes can be used as a layer on top of a visualization rendered on Canvas - Canvas Parallel Coordinates. This is a nice approach to leverage both SVG and Canvas, and I think it justifies only providing an SVG API for axes.

Yep, totally.