I'm trying to have a start date and end date of my zoom, not the start min and max of my chart. I don't find issues. Someone can help ? It's in VueJS
plugins: {
datalabels: {
display: false
},
zoom: {
zoom: {
enabled: true,
drag: true,
mode: "x",
sensitivity: 100,
speed: 10,
onZoom: this.onZoom
}
}
}
onZoom({ chart }) {
console.log(chart)
const start = chart.scales.time.min; // I have to change this
const end = chart.scales.time.max; // I have to change this
console.log(start, end)
this.$emit("interval", { start, end });
}
for example I have my chart start at 12:00 and end at 16:00. I click between 14:00 and 15:00 and I want to take these values and give it to my parent.