const actions = [
{
name: 'Zoom +10%',
handler(chart) {
chart.zoom(1.1);
}
}, {
name: 'Zoom -10%',
handler(chart) {
chart.zoom(0.9);
},
}, {
name: 'Zoom x +10%',
handler(chart) {
chart.zoom({x: 1.1});
}
}, {
name: 'Zoom x -10%',
handler(chart) {
chart.zoom({x: 0.9});
},
}, {
name: 'Pan x 100px (anim)',
handler(chart) {
chart.pan({x: 100}, undefined, 'default');
}
}, {
name: 'Pan x -100px (anim)',
handler(chart) {
chart.pan({x: -100}, undefined, 'default');
},
}, {
name: 'Zoom x: 0..-100, y: 0..100',
handler(chart) {
chart.zoomScale('x', {min: -100, max: 0}, 'default');
chart.zoomScale('y', {min: 0, max: 100}, 'default');
}
}, {
name: 'Reset zoom',
handler(chart) {
chart.resetZoom();
}
}
];