Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataLogger with AxisScaleLock(true), data/axis limit issue #3789

Closed
bukkideme opened this issue May 6, 2024 · 1 comment
Closed

DataLogger with AxisScaleLock(true), data/axis limit issue #3789

bukkideme opened this issue May 6, 2024 · 1 comment

Comments

@bukkideme
Copy link
Contributor

Issue:
DataLogger strange behaviour when axis scale lock is active. The data first part is not visible after a while, and when the loop finishes, the Mouse Middle button click works wrong: does not auto-scale the graph so the whole data is visible.

ScottPlot Version: 4.1.71

Code Sample:

DataLogger dataLogger = formsPlot1.Plot.AddDataLogger(lineWidth: 3);
double[] arrayY = new double[] { 0, 2, 10, 10, 10, 5, 0, 0, 5, 10 };

//if this is present, the Mouse middle click behaves strange after the plot finished, 
//and the first part of the plot is not visible when the loop finishes
formsPlot1.Plot.AxisScaleLock(true);

for (int i = 0; i < 10; i++)
{
    dataLogger.Add(i * 3000, arrayY[i] * 1000);
    Thread.Sleep(250);
    formsPlot1.Refresh();
}
@swharden
Copy link
Member

Hi @bukkideme, thanks for reporting this! Before I pop the hood on this one and do a deeper dive, check out the overload of AxisScaleLock() which accepts a scale mode. I suspect that your issue may be resolved by passing in the correct scale mode. If not, let me know and we can open this back up and take a closer look 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants