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

LineChartView avoid painting 0 values #830

Closed
cepages opened this issue Mar 10, 2016 · 3 comments
Closed

LineChartView avoid painting 0 values #830

cepages opened this issue Mar 10, 2016 · 3 comments

Comments

@cepages
Copy link

cepages commented Mar 10, 2016

Hi I'm using LineChartView and I'm trying to remove 0 values from the graph.

screen shot 2016-03-10 at 17 09 19

I tried to remove the values from the list:

screen shot 2016-03-10 at 17 09 26

But I'm still want the full list of days. Is there any easy way to do it?

Thanks

@liuxuan30
Copy link
Member

you just keep the x values as the same, and don't create entry with zero values for the xIndex into data set and continue. The line dot will connect to the next available dot, e.g. in your first chart, the '7' dot will connect to '6.7' directly

@cepages
Copy link
Author

cepages commented Mar 11, 2016

Yeah! Thanks a lot @liuxuan30

@or1onsli
Copy link

or1onsli commented Aug 9, 2018

Hi, I am facing the same issue. Can you put a sample-code to show me how did you solve this? I already removed the zero-value entries from the dataset but I don't understand how to write all the labels correctly on the xAxis...

Thank you for the help!

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

No branches or pull requests

3 participants