Zoom working great buy I cant pan, this is my "options" section, everything is working except pan Im loading everything from json thats why I don't provide a jfiddle yet. No errors in console. Any idea of where I can start?
Im using:
window.myScatter = Chart.Scatter(ctx, {
Loaded scripts:
"../bootstrap/js/bootstrap.min.js"
"../js/Chart.bundle.min.js"
"../js/Chart.Annotation.min.js"
"../js/Chart.Zoom.min.js"
My options:
options: {
responsive: true,
hover: {
mode: 'single'
},
elements: {
/*point: {
hitRadius:20
},*/
line: {
backgroundColor: 'rgba(200, 0, 0 ,0)',
borderWidth: 0,
borderColor: 'rgba(200, 0, 0, 0)',
fill: false,
}
},
hoverAnimationDuration: 400,
stacked: false,
title:{
display:false,
//text:"bla bla bla"
},
tooltips: {
enabled: true,
mode: 'single',
callbacks: {
label: function(tooltipItems, data) {
return data.datasets[tooltipItems.datasetIndex].data[tooltipItems.index].label1 + '\n ' +
data.datasets[tooltipItems.datasetIndex].data[tooltipItems.index].label2;
}
}
},
scales: {
xAxes: [{
position: 'bottom',
gridLines: {
zeroLineColor: "rgba(0,255,0,0)"
},
scaleLabel: {
display: true,
labelString: 'Minutos'
}
}],
yAxes: [{
position: 'right',
gridLines: {
zeroLineColor: "rgba(0,255,0,0)",
},
scaleLabel: {
display: true,
labelString: 'DC (%)'
}
}]
},
pan: {
enabled: true,
mode: 'xy'
},
zoom: {
enabled: true,
mode: 'xy',
},
annotation: {
annotations: [{
type: 'line',
mode: 'horizontal',
scaleID: 'y-axis-1',
value: data.datasets[2].data[0].y, /*'1'*/
borderColor: 'DimGrey',
borderWidth: 1
},{
type: 'line',
mode: 'vertical',
scaleID: 'x-axis-1',
value: data.datasets[2].data[0].x, /*'1'*/
borderColor: 'DimGrey',
borderWidth: 1
}],
}
}