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

Stepped line charts #539

Closed
andrelind opened this issue Nov 7, 2015 · 6 comments
Closed

Stepped line charts #539

andrelind opened this issue Nov 7, 2015 · 6 comments
Labels

Comments

@andrelind
Copy link

Stepped line charts are not supported...?
If we could get that implemented then we can finally drop the huge bloat that is CorePlot from our projects...!

@ezamagni
Copy link
Contributor

I agree, this would be really helpful

@danielgindi
Copy link
Collaborator

What's "stepped line chart"?

@ezamagni
Copy link
Contributor

Take an example input of (0,0), (1, 1), (2, 2), (3, 1) and look at the (terrible) sketch below:
steppedexample

The first line is what ios-charts would draw: a linear segment connecting each point; the bottom chart is what is called a "stepped line" and it's very useful for sampled data

@danielgindi
Copy link
Collaborator

Man you only need about 30 minutes, cloning the drawLinear function in the line chart - and making it draw to start and end point of each bar instead of just to the center.

That should just be an option to toggle in the dataset to trigger stepped rendering. I do not have the time to implement this right now but I will be more than happy to review a PR :-)

@ezamagni
Copy link
Contributor

Thanks for the suggestion, Daniel! As soon as i manage to get some time i will try to play with it.

ezamagni added a commit to ezamagni/ios-charts that referenced this issue Feb 26, 2016
A new flag was added to ILineChartDataSet and relative implementations. The value of the flag is then used to slightly modify the behavior of drawLinear and generateFilledPath in LineChartRenderer.
The appropriate demo viewControllers were also updated with the new flag.
@danielgindi
Copy link
Collaborator

This is merged in. Thank you @ezamagni !

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