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

Multiple line charts on the same graph #292

Closed
lewisjkl opened this issue Aug 10, 2015 · 4 comments
Closed

Multiple line charts on the same graph #292

lewisjkl opened this issue Aug 10, 2015 · 4 comments

Comments

@lewisjkl
Copy link

I am working on getting multiple line charts displaying on the same graph. The problem is, when there are missing data points, the graph doesn't fill in gaps. Is there a way for it to automatically do this?

simulator screen shot aug 10 2015 10 02 35 am
simulator screen shot aug 10 2015 10 02 37 am

The first and second images show the same graph, only a slightly different frame for the x-axis. Has anyone else run into this same problem? I believe the problem stems from lacking enough data points. The graph displays accurately when zoomed out, but runs into this problem when I zoom between two known data points where no data point is present. The solution I'm currently exploring is to interpret the slope between points and fabricate data points for the missing x-axis points. This process is quite extensive and seems a little impractical. If anyone has seen this problem and has a solution, please let me know.

Here is the same question on stack overflow if you prefer to answer it there. http://stackoverflow.com/questions/31924619/ios-charts-graph-incomplete-due-to-missing-data

Thanks

@liuxuan30
Copy link
Member

are you talking about the part of first screenshot, where there are addtional filling rendering but there is no y value? Which line rendering are you using? cubic or linear? If it's linear, take a look at generateFilledPath, this is the function which produce the rect to fill the part which is beneath the line. I got a request for supporting truncating the lines: #280

I got my implementation, but while enable isDrawFilledEnabled, it's still buggy.

@danielgindi
Copy link
Collaborator

This is actually a duplicate of #157

@danielgindi
Copy link
Collaborator

@liuxuan30 your feature request is the exact opposite from what @lewisjkl is trying to achieve :-)

@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.

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