Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix negetive number or string exist in dimensions array, the correspo… #10346

Merged
merged 3 commits into from May 5, 2019

Conversation

susiwen8
Copy link
Contributor

…nding line won't show (#10343)

Close #10343

@susiwen8
Copy link
Contributor Author

@100pah Could you review this PR?

Copy link
Contributor

@Ovilia Ovilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!
Checking == null is not quite right. Here what it does with encodeDef.set(coordDim, false); is to ignore the encoding of an invalid entry. For example, if there is {x: -1}, x should be ignored for encoding. But what causes the bug is that '-1' < 0 is also true.
So a better solution here is to check if typeof dataDims[0] is 'number' and then check if it's negative.

@Ovilia Ovilia added this to Waiting for Basic Review in PR Reviews via automation May 5, 2019
@Ovilia Ovilia moved this from Waiting for Basic Review to Waiting for Author in PR Reviews May 5, 2019
@susiwen8
Copy link
Contributor Author

susiwen8 commented May 5, 2019

@Ovilia Thanks for your enlightenment, I didn't understand why you need check negative number at the time. I have corrected my code, please check it.

@Ovilia Ovilia moved this from Waiting for Author to Waiting for Detailed Review in PR Reviews May 5, 2019
Tweak the "is string" check. Should better be the same as the existing checking.
@100pah
Copy link
Member

100pah commented May 5, 2019

@Ovilia Thanks for your enlightenment, I didn't understand why you need check negative number at the time. I have corrected my code, please check it.

It is a feature that use negative dimension value to prevent that dimension be filtered or processed in the workflow.

PR Reviews automation moved this from Waiting for Detailed Review to Pending Merge May 5, 2019
@Ovilia
Copy link
Contributor

Ovilia commented May 5, 2019

@susiwen8 Thanks for your contribution. That really helps a lot!

@100pah 100pah merged commit bf49af0 into apache:master May 5, 2019
PR Reviews automation moved this from Pending Merge to Merged May 5, 2019
@susiwen8 susiwen8 deleted the #10343 branch May 5, 2019 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
PR Reviews
  
Merged
Development

Successfully merging this pull request may close these issues.

在多折线图里,如果dimensions里有负数,则其对应的那条折线无法绘制
3 participants