You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are your thoughts on allowing user control over the precision of generated coordinates from methods like line() and area()?
I'm thinking of two reasons why this is potentially useful:
Any kind of non-browser static rendering where file size is a consideration.
I've run into a few browser-specific SVG rendering bugs that are precision-dependent, where coordinates with many significant digits can lead to weird problems (e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1507603).
2 has only come up on rare occasions for me, but 1 has come up more often.
I could imagine two versions:
Specify a number to round each coordinate to:
d3.line().precision(1e-3);
Or instead update d3-path directly to take an optional precision argument that gets applied in the toString() method, and then someone could pass one as a custom context.
Any thoughts on the merit of incorporating this? The latter approach would avoid cluttering the main API but still provide a low-level outlet for interested users.
The text was updated successfully, but these errors were encountered:
What are your thoughts on allowing user control over the precision of generated coordinates from methods like
line()
andarea()
?I'm thinking of two reasons why this is potentially useful:
2 has only come up on rare occasions for me, but 1 has come up more often.
I could imagine two versions:
Specify a number to round each coordinate to:
Or instead update
d3-path
directly to take an optional precision argument that gets applied in thetoString()
method, and then someone could pass one as a custom context.Any thoughts on the merit of incorporating this? The latter approach would avoid cluttering the main API but still provide a low-level outlet for interested users.
The text was updated successfully, but these errors were encountered: