Here is a Nice jQuery Plugin Which Can Convert Data to Inline SVG Pie, Line or Bar Chart in Very Easy to Follow Steps. Here are Some Details. In certain type of weblogs or webpages, it is quite important to show SVG Pie, Line or Bar Chart inline, the method must have cross browser compatibility, cross operating system compatibility and multi device support. As can be guessed, this jQuery Plugin to Convert Data to Inline SVG Pie, Line or Bar Chart not only fulfills these criterion but also is free.
Peity : The jQuery Plugin to Convert Data to Inline SVG Pie, Line or Bar Chart
Peity is the name of the jQuery Plugin and here is the official repository :
Actually the repository looks bigger but the jQuery, even not in minified form is not very bigger – https://gist.github.com/AbhishekGhosh/9900038. Including the script here would convert the guide to relatively difficult to read. As you can see, there are explicit values :
fill: ["#ff9900", "#fff4dd", "#ffc66e"]
which obviously can be changed according to your need. If you use data attributes, Peity will apply their values to the defaults with the same names automatically, that way is more easy.
Demonstration of the jQuery Plugin to Convert Data to Inline SVG Pie, Line or Bar Chart
Excellent documentation and live examples can be seen here :
Just include the span class as your data :
and include the jQuery Plugin and you will get the nice result. So, actually 3 Js are required :