Create Material Design Style Charts using jQuery Material Charts - Download Create Material Design Style Charts using jQuery - Material Charts

Download Create Material Design Style Charts using jQuery – Material Charts

Posted on

This time I will share jQuery Plugin and tutorial about Create Material Design Style Charts using jQuery – Material Charts, hope it will help you in programming stack.

Create Material Design Style Charts using jQuery Material Charts - Download Create Material Design Style Charts using jQuery - Material Charts
File Size: 50.4 KB
Views Total: 14502
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Material Charts is a lightweight jQuery plugin helps you create nice, clean, Material Design styled charts / diagrams with plain html, CSS and JavaScript. Currently supports column / pie chart. More chart types will be coming soon.

How to use it:

1. Copy and include the JavaScript file material-charts.js, and the style sheet material-charts.css in your project.

1 <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
2   ...
3 <link rel="stylesheet" href="css/material-charts.css">
4 <script src="js/material-charts.js"></script>

2. Create an empty DIV element for the chart.

1 <div id="demo"></div>

3. Create datasets you want to plot as a bar chart.

01 var barchart = {
02     "datasets": {
03       "values": [5, 10, 30, 50, 20],
04       "labels": [
05         "JavaScript",
06         "Swift",
07         "Object-C",
08         "C++",
09         "Python"
10       ],
11       "color": "blue"
12     }
13     // more options here
14 };

4. Initialize the plugin to render a basic bar chart inside the DIV element you just created.

1 MaterialCharts.bar("#demo", barchart)

5. Initialize the plugin to render a pie chart chart inside the DIV element you just created.

1 MaterialCharts.pie("#demo", piechart)

6. Chart options available.

01 // chart title
02 "title": "Example Bar Chart",
03  
04 // height / width
05 "height": "300px",
06 "width": "500px",
07  
08 // background color
09 "background": "#FFFFFF",
10  
11 // shadow depth
12 "shadowDepth": "1"

Change log:

2015-09-07

  • modifications to work with invisible charts

2015-09-01

  • added pie chart support

This awesome jQuery plugin is developed by jacobnisnevich. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net