Html5: generate a pie chart and html5: generate a Statistical Chart
Here we will introduce a jQuery plug-in: jquery. easysector. js
Html5 provides a powerful drawing API that allows us to easily draw various images using javascript. This article describes how to use HTML5 to draw a pie chart (Statistical Chart. First look at the pie chart effect:
Http://hovertree.com/texiao/easysector/
This chart is dynamically generated. It dynamically draws a pie chart based on the input ratio parameter (array. The size of the pie chart is dynamically adjusted based on the <canvas> height.
How to Use the easysector Plugin:
REFERENCE The jquery library and jquery. easysector. js to prevent a div (for example, <div id = "easysector"> </div>) on the page)
Then, use the js array to construct the data, and then execute the easysector () method. The parameters are the constructed array and name size.
The Code is as follows:
<! DOCTYPE html>
Simple code see: http://hovertree.com/h/bjaf/easysector.htm
More effect: http://www.cnblogs.com/jihua/p/webfront.html