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

Curved line charts #23

Closed
ryancoughlin opened this issue Mar 21, 2014 · 8 comments
Closed

Curved line charts #23

ryancoughlin opened this issue Mar 21, 2014 · 8 comments

Comments

@ryancoughlin
Copy link

Wanted to see what you guys think of the possible option for curved/smooth line charts? Or if you have already consider it?

Either way, love what you're doing with this. Working great.

(This can be marked as an enhancement)

@myusuf3
Copy link

myusuf3 commented Mar 25, 2014

+1 for smoothing! I am even down to help out with some guidance.

@simonbromberg
Copy link

+1 from me as well

@terryworona
Copy link
Collaborator

Any ideas on how we could implement this?

@ryancoughlin
Copy link
Author

I was looking at this originally just to get an idea and retro fit where
needed. Minus the crazy swinging animation:
http://stackoverflow.com/questions/14571148/ios-animate-transformation-from-a-line-to-a-bezier-curve

On Sat, Apr 12, 2014 at 12:17 PM, simonbromberg [email protected]:

Bezier paths?

Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-40284613
.

@simonbromberg
Copy link

BEMSimpleLineGraph (https://github.com/Boris-Em/BEMSimpleLineGraph) seems to have an implementation of this.

@ktran03
Copy link
Contributor

ktran03 commented Apr 20, 2014

got bored, had a go at this. Checkout my pull request. First attempt at something like this, open to criticism :) cheers.

@terryworona
Copy link
Collaborator

Added this functionality via:

/**
 *  Returns whether or not a line should be rendered with curved connections and rounded end caps.
 *
 *  Default: NO
 *
 *  @param lineChartView    The line chart object requesting this information.
 *  @param lineIndex        An index number identifying a line in the chart.
 *
 *  @return Whether or not a line should smooth it's connections and end caps.
 */
- (BOOL)lineChartView:(JBLineChartView *)lineChartView smoothLineAtLineIndex:(NSUInteger)lineIndex;

Commit: 87b62ad
Version: v2.4.0

Thanks to @ktran03 for the PR!

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

No branches or pull requests

5 participants