New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Canvas. #1
Comments
Sorry for the delay in replying to this pull request. Here's what I think so far (subject to major revisions):
Would love to hear your thoughts. Also, I may be wrong on any/all of this, so please feel free to correct any errors. |
A v3 version of d3-hexbin that takes a Canvas context here: http://bl.ocks.org/syntagmatic/002ef2fb5c1dc2df5821 My opinion is d3-hexbin shouldn't deal directly with Canvas or SVG path strings. It should output arrays of coordinates. Turning that array into a path string or a Canvas subroutine should be a convenience method or a separate utility like d3-path. But practically since the plugin already supported SVG, adding a convenient way to render to Canvas instead would be nice. In this case, the API should be similar to d3.geoPath. A method to access the raw coordinates would still be useful. |
- using hexbin.context([context]), hexbin.hexagon() and hexbin.mesh() support canvas ; fixes #1 - incremental updates: bins.add(point); bins.addAll(points); remove(point); bins.removeAll(points); fixes #3 - hexbin.angle([angle]) sets or reads an angle (default 0°, use 90° for flat-topped hexagons) ; fixes #8
- using hexbin.context([context]), hexbin.hexagon() and hexbin.mesh() support canvas ; fixes #1 - incremental updates: bins.add(point); bins.addAll(points); remove(point); bins.removeAll(points); fixes #3 - hexbin.angle([angle]) sets or reads an angle (default 0°, use 90° for flat-topped hexagons) ; fixes #8
Should hexbin.hexagon implement the symbol type interface? But it has a specific radius, not an arbitrary size…
Should the hexagon method take a context? But then you have to construct a path buffer manually?
Should the hexbin take a context? And then render like a shape? (Rendering either a mesh of individual hexbins?) Maybe?
The text was updated successfully, but these errors were encountered: