|
Chart Scaling after loading new data |
Posted by Jeff on Jan-15-2025 10:56 |
|
After loading a floating bar chart with:
' Add the BoxWhiskerLayer using the AddBoxWhiskerLayer2 method
Dim layer As BoxWhiskerLayer = c.addBoxWhiskerLayer2(ChipTOPData, ChipBOTTOMData, Nothing, Nothing, Nothing, colors, Nothing, ChipDesc)
I call it again with new data.
The first data set has a max value of 1000, but the second dataset has a max value of 80.
How can I autoscale the second call?
I tried chart.yAxis().setAutoScale() but no effect.
regards,
Jeff |
Re: Chart Scaling after loading new data |
Posted by Peter Kwan on Jan-16-2025 00:40 |
|
HI Jeff,
From our previous communication, I think your chart is zoomable/scrollable and the axis scale is synchronized with the viewport (by syncLinearAxisWithViewPort). When you update the chart, the viewport settings will not automatically change, as in many usage (such as in realtime charts), it is better to keep the axis scale stable when the chart changes.
If the above is the cause of the problem case, you may reset the viewport parameters by using myChartViewer.setFullRange("y", 0, 0). Since the axis range "0 to 0" is invalid, this will force ChartDirector to detect the actual axis range from the chart.
Best Regards
Peter Kwan |
|