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

Line graph from example should be a straight line? #7

Open
aled opened this issue Sep 19, 2011 · 2 comments
Open

Line graph from example should be a straight line? #7

aled opened this issue Sep 19, 2011 · 2 comments

Comments

@aled
Copy link

aled commented Sep 19, 2011

I created a graph from the examples, like this:

new Ico.LineGraph(document.getElementById('chart_1'), [1, 2, 3, 4], { grid: true });

However the line that is drawn isn't straight - screenshot here: http://imgur.com/mYfXE

Aled.

@alexyoung
Copy link
Owner

It's drawing it with the curved lines I think, try this:

  new Ico.LineGraph(document.getElementById('bargraph'), [1, 2, 3, 4], { grid: true, curve_amount: 0 });

@uiteoi
Copy link
Collaborator

uiteoi commented Sep 21, 2011

Alex, I have created a new test case in https://github.com/uiteoi/ico that shows this issue fixed. You can see the above test case at the bottom of: http://reverserisk.com/ico/

I have entirely redesigned the Béziers curve calculation (handles) to avoid all sorts of issues that used to show unnatural curves. This straight line test case emphasizes one of these issues.

You can get the code from line 694 at https://github.com/uiteoi/ico/blob/master/ico.js

I hope this helps,
Jean.

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