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

How to set the LineChart disconnect style, I add NAN to Entry, isInBoundsRight function is crashed. #1471

Closed
mekhi opened this issue Sep 19, 2016 · 8 comments

Comments

@mekhi
Copy link

mekhi commented Sep 19, 2016

Hi,I want to show the LineChart disconnect style like this.

qq20160919-1

In MPAndroidChart, set Entry(float.NAN, i) can be done, but in Charts, I also set "(CGFloat)NAN", it crashed.

[yVals addObject:[[ChartDataEntry alloc] initWithValue:(double)NAN xIndex:i]];

qq20160919-0

Thanks in advance:)

@Huang-Libo
Copy link

Huang-Libo commented Sep 19, 2016

@mekhi
v3.0 seems support break line mode.
Right?@liuxuan30

@liuxuan30
Copy link
Member

liuxuan30 commented Sep 20, 2016

@danielgindi did v3.0 add this? I don't remember.
However, if you use multiple data sets, it can be solved, though a little complicated composing the data sets.

I do implemented line breaking feature in my previous company, however, I don't find a time to port it.

@mekhi
Copy link
Author

mekhi commented Sep 20, 2016

@liuxuan30 I solved the problem temporarily,set the line which near to point color is clearColor. According to "NAN value" to determine which lines we should hide(clearColor).

I think this is not a good solution, only can temporarily solve the problem, if Charts implemented line breaking feature, That'd be great. :)

@liuxuan30
Copy link
Member

clear color will do the trick but highlight will expose it. Consider one line segment per data set

@danielgindi
Copy link
Collaborator

Charts do not support this currently.
You need to add another dataset to your data Data object.

@Huang-Libo
Copy link

@danielgindi Have you considered to support line-break with one dataSet feature?

@liuxuan30
Copy link
Member

liuxuan30 commented Sep 22, 2016

Well, it has been asked last year. Seems not a lot of people asking, and multiple data sets did the trick, so not a high priority.

@hfahmy
Copy link

hfahmy commented Aug 7, 2020

This is needed

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

5 participants