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

Break lines when yValues are missing for consecutive indexes #280

Open
liuxuan30 opened this issue Aug 6, 2015 · 8 comments
Open

Break lines when yValues are missing for consecutive indexes #280

liuxuan30 opened this issue Aug 6, 2015 · 8 comments
Labels

Comments

@liuxuan30
Copy link
Member

There should be demand when we add xIndex but no entry, the line should be truncated, not goes to next entry.

@danielgindi danielgindi changed the title [feature request] support truncating lines if the xIndex in dataSet not continuous Truncating lines if the xIndex in dataSet not continuous Aug 11, 2015
@danielgindi danielgindi changed the title Truncating lines if the xIndex in dataSet not continuous Break lines when yValues are missing for consecutive indexes Aug 11, 2015
@danielgindi
Copy link
Collaborator

Currently the behaviour in line charts for missing y values is "undefined". We are going to define it soon, and possibly allow more control over that decision.

@liuxuan30
Copy link
Member Author

I tried to implement mine last week, it could break the lines. But for the filling function, it's still buggy. The filling rect is quite complicated when involving negative values. It seems the filling rect will always use y=0 axis line, so when there is only negative values, it fill the rect above line, below y=0 axis.

@noais
Copy link
Contributor

noais commented Aug 25, 2015

@liuxuan30 have you some news about this issue?

@liuxuan30
Copy link
Member Author

Well I could break the lines, but the rect filling part is still buggy and I gave up, too many corner cases for my implementations and I don't have much time to think carefully.

@noais
Copy link
Contributor

noais commented Aug 26, 2015

Do you have this alterations on your branch? Maybe I can try to help you.

@liuxuan30
Copy link
Member Author

I don't have yet, I just tried in my sub class, you can have your implementations and better than mine :)

Breaking the lines is simple. Just start another moveToPoint loop and close previous path properly. I feel the hard part is the filling function. Consider if there are all negative values, and the y axis is at the top... and half negative and half postive..

@noais
Copy link
Contributor

noais commented Aug 27, 2015

This week end I'm going to try implement this feature.

@noais
Copy link
Contributor

noais commented Aug 31, 2015

Pull request made #335. Can you have a look I give me your opinion please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants