Time X axis zoom and pan does not work with chart.js 2.7.0
I had the same thing, and some issues with 2.6.0, it seems to work with 2.5.0
Same problem. So downgrading charts is the only solution?
Here some more information about my case. I'm using this plugin in an ionicv1 app.
Here is the relevant part of my configuration:
scales: {
xAxes: [{
type: 'time',
ticks:{
fontSize: 8
},
format: "HH:mm",
unit: 'hour',
unitStepSize: 2,
time: {
format: "HH:mm",
unit: 'hour',
unitStepSize: 2,
displayFormats: {
'minute': 'HH',
'hour': 'HH',
}
}
}]
},zoom: {
enabled: true,
mode: 'x'
},
pan: {
enabled: true,
mode: 'x'
}
I tried using mode 'xy' or 'y' the y-axis zoom works in both cases. However the x-zoom is not responding.
same for me
the problem is that scale.firstTick and scale.lastTick are not available in chart.js. You should replace it for scale.min and scale.max in the chartjs-plugin-zoom.js in the functions zoomTimeScale and panTimeScale.
The zoom works fine, but the pan has a strange behavior, for me that is ok...
Cheers!
@etimberg @simonbrunel Any change to look at the plugin repository? PRs are waiting since May, plugin does not work with recent chart.js
Duplicate of https://github.com/chartjs/chartjs-plugin-zoom/issues/90. PR with fix pending
PR with fix was merged