ico
ico copied to clipboard
Line graph from example should be a straight line?
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.
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 });
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.