gwatts / jquery.sparkline

A plugin for the jQuery javascript library to generate small sparkline charts directly in the browser
http://omnipotent.net/jquery.sparkline/
1.24k stars 278 forks source link

Bezier line graph possible? #154

Open coax opened 9 years ago

coax commented 9 years ago

Hey all,

did anyone try to draw Bézier curves in line chart? It would look great with smoothened edges like chart.js (I don't want to use that plugin due to bad tooltip support)

I guess this line:

context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);

should be replaced with something like this:

context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);

and it should look like this: tooltip2