Copilot commented on code in PR #21752:
URL: https://github.com/apache/echarts/pull/21752#discussion_r3994880250
##########
src/component/marker/MarkLineView.ts:
##########
@@ -112,9 +120,11 @@ const markLineTransform = function (
mlFrom.coord[baseIndex] = -Infinity;
mlTo.coord[baseIndex] = Infinity;
- const precision = mlModel.get('precision');
+ if (precision == null) {
+ precision = mlModel.get('precision');
+ }
if (precision >= 0 && isNumber(value)) {
- value = +value.toFixed(Math.min(precision, 20));
+ value = numberUtil.round(value, precision);
Review Comment:
`numberUtil.round` clamps precision to 20, so a valid target such as
`3.456e-100` has precision 103 but is converted to `0`; the mark line can
therefore still move or disappear. Direct `xAxis`/`yAxis` targets should bypass
rounding entirely, while statistic items can continue honoring
`markLine.precision`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]