Skip to content

SignalXY: exception when filled area is 0px #1476

@chenxuuu

Description

@chenxuuu

Bug Report

Issue:

System.ArgumentException: 矩形“{X=316,Y=0,Width=0,Height=547}”的宽度或高度不能等于零(width or height should not be 0)

Reproducing:

I only find 1 way to reproduce this

when I scrolling mouse to make line smaller, it happend

KenkBdGXTP

wpf code(project zip:WpfApp2.zip)

private void Window_Loaded(object sender, RoutedEventArgs e)
{
        double[] data = DataGen.RandomWalk(100);
        double[] x = new double[100];
        for(int i=0;i<100;i++)
                x[i] = i;
        var line = Plot.Plot.AddSignalXY(x,data);
        line.FillBelow();
        Plot.Render();
        }
}
<WpfPlot Name="Plot"/>

and another way only reproduce once, when I render image without any mouse scroll. but I can't reproduce this now

System Details

  • ScottPlot Version: 4.1.27
  • Operating System: Windows 10
  • Application Type: WPF
  • .NET Version: NET Framework 4.7.2

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