Skip to content

Commit 403da02

Browse files
committed
Add similar example for AreaSeries
1 parent fd6453e commit 403da02

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

  • Source/Examples/ExampleLibrary/Issues

Source/Examples/ExampleLibrary/Issues/Issues.cs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,34 @@ namespace ExampleLibrary
2020
[Examples("Z1 Issues")]
2121
public class Issues
2222
{
23-
[Example("#1044 MinimumSegmentLength not working")]
24-
public static PlotModel MinimumSegmentLength()
23+
[Example("#1044 MinimumSegmentLength not working with AreaSeries")]
24+
public static PlotModel MinimumSegmentLengthInAreaSeries()
2525
{
26-
var model = new PlotModel() { Title = "MinimumSegmentLength", Subtitle = "Three different curves should be visible" };
26+
var model = new PlotModel() { Title = "MinimumSegmentLength in AreaSeries", Subtitle = "Three different areas should be visible" };
27+
for (var msl = 0; msl <= 200; msl += 100)
28+
{
29+
var series = new AreaSeries
30+
{
31+
Title = $"MinimumSegmentLength = {msl}",
32+
MinimumSegmentLength = msl
33+
};
34+
35+
for (int i = 0; i < 1000; i++)
36+
{
37+
series.Points.Add(new DataPoint(i, Math.Sin(i * 0.01) + 1));
38+
series.Points2.Add(new DataPoint(i, Math.Sin(i * 0.01)));
39+
}
40+
41+
model.Series.Add(series);
42+
}
43+
44+
return model;
45+
}
46+
47+
[Example("#1044 MinimumSegmentLength not working with LinesSeries")]
48+
public static PlotModel MinimumSegmentLengthInLineSeries()
49+
{
50+
var model = new PlotModel() { Title = "MinimumSegmentLength in LineSeries", Subtitle = "Three different curves should be visible" };
2751
for (var msl = 0; msl <= 200; msl += 100)
2852
{
2953
var series = new LineSeries

0 commit comments

Comments
 (0)