javascript - SVG or Canvas! Which is better for charts? -
i going plot heavy info centric charts on website. have selection of svg or canvas. 1 improve choice? , suggestions on sort of frameworks should evaluate , use?
the d3 library standard info visualization. beingness said, if using framework perhaps framework specific library?
for example, angularjs has corresponding nvd3 library simplifies setup process. if willing larn d3, find flexibility offered should fit applications!
http://jsfiddle.net/enigmarm/3hl4a/13/
here illustration chart sorting functionality.
note d3, easy manage data:
var dataset = [ { key: 0, value: 5 }, { key: 1, value: 10 }, { key: 2, value: 13 }, { key: 3, value: 19 }, { key: 4, value: 21 }, { key: 5, value: 25 }, { key: 6, value: 22 }, { key: 7, value: 18 }, { key: 8, value: 15 }, { key: 9, value: 13 }, { key: 10, value: 11 }, { key: 11, value: 12 }, { key: 12, value: 15 }, { key: 13, value: 20 }, { key: 14, value: 18 }, { key: 15, value: 17 }, { key: 16, value: 16 }, { key: 17, value: 18 }, { key: 18, value: 23 }, { key: 19, value: 25 } ];
a simple set of string:value pairs such generated script or db.
javascript canvas svg charts
No comments:
Post a Comment