Rounds a value to the precision the drawn geometry can actually carry.
A line's vertices are read back out of its d attribute, and the path
serializer writes each coordinate to a fixed number of decimal places — so
unlike a rect's x and y, the number is quantised before the adapter ever
sees it. On a chart spanning thousands of units that quantisation is worth
more than a unit of data, and reporting the inverted figure in full would
dress a rounded pixel up as an exact measurement.
So the value is rounded to the granularity the pixel quantum buys, and no
finer. On an ordinary chart the quantum is worth far less than the last
decimal of the data, and the value comes back exact.
Rounds a value to the precision the drawn geometry can actually carry.
A line's vertices are read back out of its
dattribute, and the path serializer writes each coordinate to a fixed number of decimal places — so unlike a rect'sxandy, the number is quantised before the adapter ever sees it. On a chart spanning thousands of units that quantisation is worth more than a unit of data, and reporting the inverted figure in full would dress a rounded pixel up as an exact measurement.So the value is rounded to the granularity the pixel quantum buys, and no finer. On an ordinary chart the quantum is worth far less than the last decimal of the data, and the value comes back exact.