Closed OstapchelaEst closed 1 month ago
Try setting autoZoom: false
on your Y axis:
var valueAxis = mainPanel.yAxes.push(
am5xy.ValueAxis.new(root, {
renderer: am5xy.AxisRendererY.new(root, {
pan: "zoom"
}),
autoZoom: false,
extraMin: 0.1, // adds some space for for main series
tooltip: am5.Tooltip.new(root, {}),
numberFormat: "#,###.00",
extraTooltipPrecision: 2
})
);
I am trying to use the functionality that changes the scale of the chart on the Y axis when the mouse is clicked and dragged on the Y axis. For static graphs it works fine, but in graphs with dynamic data after the change is not saved and the scale returns to the previous state.
https://jsfiddle.net/v4hc23kg/