PHP Classes

File: vendors/jquery.easy-pie-chart/docs/plugin-api.md

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/jquery.easy-pie-chart/docs/plugin-api.md   Download  
File: vendors/jquery.easy-pie-chart/docs/plugin-api.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 1,171 bytes
 

Contents

Class file image Download

jQuery

$(function() {
    // instantiate the plugin
    ...
    // update
    $('.chart').data('easyPieChart').update(40);
    ...
    // disable animation
    $('.chart').data('easyPieChart').disableAnimation();
    ...
    // enable animation
    $('.chart').data('easyPieChart').enableAnimation();
});

Vanilla JS

// instantiate the plugin
var chart = new EasyPieChart(element, options);
// update
chart.update(40);
// disable animation
chart.disableAnimation();
// enable animation
chart.enableAnimation();

Using a gradient

new EasyPieChart(element, {
  barColor: function(percent) {
    var ctx = this.renderer.ctx();
    var canvas = this.renderer.canvas();
    var gradient = ctx.createLinearGradient(0,0,canvas.width,0);
        gradient.addColorStop(0, "#ffe57e");
        gradient.addColorStop(1, "#de5900");
    return gradient;
  }
});

AngularJS

For a value binding you need to add the percent attribute and bind it to your controller.

RequireJS

When using RequireJS you can define your own name. Examples can be found in the demo/requirejs.html.