-
Notifications
You must be signed in to change notification settings - Fork 334
Closed
Description
If you try to zoom out on a logarithmic axis, the chart data will disappear. I think this is because it tries to get a negative value for the scale.
There is no problems with panning though. It correctly gets the new scale.
options: {
scales: {
xAxes: [{
type: 'linear',
ticks: {
userCallback: function(tick) {
return timeConverter(tick, false);
},
autoSkip: false,
maxRotation: 20,
minRotation: 20
},
position: 'bottom'
}],
yAxes: [{
type: 'logarithmic',
ticks: {
userCallback: function(tick) {
var remain = tick / (Math.pow(10, Math.floor(Chart.helpers.log10(tick))));
if (remain === 1) {
return sanitizeNumber(tick).toString();
}
return '';
},
},
}]
},
tooltips: {
callbacks: {
label: function(tooltipItem, chartData) {
return "Time: "+ timeConverter(tooltipItem.xLabel, true) +" - Price:"+ sanitizeNumber(tooltipItem.yLabel) +""
}
}
},
pan: {
enabled: true,
mode: 'xy',
},
zoom: {
enabled: true,
mode: 'xy',
}
Metadata
Metadata
Assignees
Labels
No labels