pissang commented on code in PR #16895: URL: https://github.com/apache/echarts/pull/16895#discussion_r851575010
########## src/scale/helper.ts: ########## @@ -128,7 +128,12 @@ export function contain(val: number, extent: [number, number]): boolean { export function normalize(val: number, extent: [number, number]): number { if (extent[1] === extent[0]) { - return 0.5; + if (val !== extent[0]) { Review Comment: This check seems to be unnecessary. When `val` equals to `extent[0]`. The equation `val - extent[0] + 0.5` will be `0.5` naturally -- 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: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org