Skip to content

Calling DateTimeTicksBottom() twice causes crash #4001

@githubkau

Description

@githubkau

Calling DateTimeTicksBottom() twice causes crash. Infinite TimeSpan is not handled.

ScottPlot Version: 5.0.35

            double[] data1 = ScottPlot.RandomDataGenerator.Generate.RandomWalk(count: 5001, mult: 1);

            var rnd = new Random();
            double[] x_vals = new double[data1.Length];
            for (int i = 0; i < data1.Length; i++)
                x_vals[i] = (DateTime.Now +TimeSpan.FromSeconds(i)).ToOADate();

            //ScottPlot.Plot myPlot = new();
            scottPlot.Plot.Add.SignalXY(x_vals, data1);
            scottPlot.Width = 300;
            scottPlot.Height = 100;
            scottPlot.Plot.Axes.DateTimeTicksBottom();
            scottPlot.Plot.Axes.DateTimeTicksBottom();

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