Skip to content

DataLoggerSource does not have a way to reset Min/Max values #3969

@jpgarza93

Description

@jpgarza93

Issue:
The DataLoggerSource class lacks a method to reset Min/Max values, causing the autoscale feature to work incorrectly.

Using dataLogger!.Data.Coordinates.RemoveAt(0); to remove data points from a DataLogger updates render correctly, but does not update the DataLogger.Data.(Min/Max) values, resulting in AvaPlot.Plot.Axes.AutoScale(); not functioning properly.

ScottPlot Version:
ScottPlot 5 (Avalonia UI)

Sample:
In my implementation, I add points to a DataLogger every millisecond. Once the count reaches 3000, I start removing the first point and append a new one, maintaining a constant count of 3000 points (this can be changed by the user). In the image below, you can see 3000 coordinates. I stopped recording at 5079 ms, but instead of my XMin being at 2079 (the correct value), it remains at 0 (the value of the first point that no longer exists).

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions