Skip to content

BarPlot: bars disappear when zooming extremely far in #1849

@ChrisAtVault

Description

@ChrisAtVault

Bug Report

Issue: When zooming/pannig on the bar plot it is incorrectly rendered - i.e. dis- / appears seemingly at random.
Might be an identical issue as in #944 and similar to #1803 but concerning barplots.
image
image
image
image
image

Reproducing: Perform zooming/panning on the plot.

public Form1()
        {
            InitializeComponent();
            var nowOADate = DateTime.Now.ToOADate();
            var maxOADate = DateTime.MaxValue.ToOADate();

            this.formsPlot1.Plot.XAxis.DateTimeFormat(true);
            this.formsPlot1.Plot.SetAxisLimits(nowOADate, nowOADate + 100, -1, 1);
            this.formsPlot1.Plot.YAxis.LockLimits(true);

            var barPlot = new BarPlot(new[] { 0.0 }, new[] { maxOADate - nowOADate }, null, new[] { nowOADate })
            {
                Orientation = Orientation.Horizontal
            };

            this.formsPlot1.Plot.Add(barPlot);
            this.formsPlot1.Render();
        }

System Details

  • ScottPlot Version: 4.1.45
  • Operating System: (Windows 10)
  • Application Type: (WinForms)
  • .NET Version: (.NET 6)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions