benhunt29 / chartist-plugin-zoom

Zoom Plugin for Chartist.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zoom plugin for Chartist.js

Please visit http://gionkunz.github.io/chartist-js/plugins.html for more information.

Available options and their defaults

var defaultOptions = {
  onZoom : undefined  // A callback (chart, resetFnc) => void which will be called on zoom. 
                      // resetFnc() will reset zoom.
};

Sample usage in Chartist.js

var chart = new Chartist.Line('.ct-chart', {
  series: [/* */]
}, {
  axisX : {
    type: Chartist.AutoScaleAxis,
  },
  plugins: [
    Chartist.plugins.zoom({
      onZoom : function(chart, reset) { storeReset(reset); };
    })
  ]
});
/* style the svg rect */
.ct-zoom-rect {
	fill: rgba(200, 100, 100, 0.3);
  stroke: red;
}

About

Zoom Plugin for Chartist.js

License:Do What The F*ck You Want To Public License


Languages

Language:JavaScript 98.5%Language:HTML 1.5%