Html5: generate a pie chart and html5: generate a Statistical Chart

Source: Internet
Author: User

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

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.