You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/04/16 03:21:48 UTC
[GitHub] [echarts] pissang commented on a diff in pull request #16895: fix: all data mapped to one col when zooming in
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-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org