Closed chelaruc closed 7 years ago
The UMD was messed up. I fixed this with 0.4.1 right now. Please try again. I tested with browserify:
var domready = require("domready");
var Chartist = require('chartist');
require('chartist-plugin-zoom');
function storeReset(reset) {
console.log(reset);
}
domready(function () {
var data = {
series: [[
{ x: 1, y: 100 },
{ x: 2, y: 50 },
{ x: 3, y: 25 },
{ x: 4, y: 66 },
{ x: 5, y: 30 },
{ x: 6, y: 22 }
]]
};
var options = {
axisX: {
type: Chartist.AutoScaleAxis
},
axisY: {
type: Chartist.AutoScaleAxis
},
plugins: [
Chartist.plugins.zoom({
onZoom : function(chart, reset) { storeReset(reset); },
})
]
};
new Chartist.Line('.ct-chart', data, options);
});
I tried again now, but get the same error :( I'm using angular cli. Can you help me with that?
Have you installed npm i --save chartist-plugin-zoom
?
Have you required require('chartist-plugin-zoom')
?
Does npm list chartist-plugin-zoom
print -- chartist-plugin-zoom@0.4.1
?
Now i get this error:
Can you help me to fix it?
Try to use import 'chartist-plugin-zoom'
.
Thanks, it's working now!
I have still issue in the storereset please find the attach.
I am trying to implement zoom feature for my pie chart now i am facing this problem.
Hi, @hansmaad! Thanks for your great work!
Can you tell me how to use this plugin? I was trying to implement this by myself, but i get this error:
My code is like that: