Holes in line series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Mth
Newbie
Newbie
Posts: 11
Joined: Thu Dec 30, 2021 12:00 am

Holes in line series

Post by Mth » Fri Nov 25, 2022 3:05 pm

Visual Studio 2022,
.net7.0 console project,
Steema.TeeChart.NET.Pro (4.2022.11.24)

I am reporting a few issues:
1. There are holes in line series for chart rendered to images (jpg, png, etc) for some sizes of result picture.
2. Stairs line and Inverted stairs line does not work.
3. No top edge line of area stairs series

Cede to reproduce issues:

using Steema.TeeChart;
using Steema.TeeChart.Styles;
using System.Drawing;

var mChart = new TChart();
mChart.Aspect.View3D = false;

mChart.Header.Visible = false;
mChart.Legend.Visible = false;

mChart.Axes.Left.AutomaticMinimum = false;
mChart.Axes.Left.Minimum = 0;
mChart.Axes.Left.AutomaticMaximum = false;
mChart.Axes.Left.Maximum = 100;

mChart.Axes.Bottom.AutomaticMinimum = false;
mChart.Axes.Bottom.Minimum = 0;
mChart.Axes.Bottom.AutomaticMaximum = false;
mChart.Axes.Bottom.Minimum = 100;

//Line:

Line line = new Line(mChart.Chart);
line.LinePen.Width = 2;
line.Color = System.Drawing.Color.Green;

line.Smoothed= true;

line.Add(0, 60);
line.Add(20, 40);
line.Add(40, 60);
line.Add(80, 40);
line.Add(100, 60);

mChart.Series.Add(line);

int i = 1;

//Holes in the line for some picture sizes:

mChart.Export.Image.PNG.Width = 240;
mChart.Export.Image.PNG.Height = 120;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_{i++:d2}.png");

mChart.Export.Image.PNG.Width = 320;
mChart.Export.Image.PNG.Height = 160;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_{i++:d2}.png");

mChart.Export.Image.PNG.Width = 520;
mChart.Export.Image.PNG.Height = 260;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_{i++:d2}.png");

mChart.Export.Image.PNG.Width = 800;
mChart.Export.Image.PNG.Height = 400;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_{i++:d2}.png");


//Stairs line and Inverted stairs line does not work:

line.Smoothed = false;
line.Stairs = true;
mChart.Export.Image.PNG.Width = 800;
mChart.Export.Image.PNG.Height = 400;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_{i++:d2}.png");

line.InvertedStairs = true;
mChart.Export.Image.PNG.Width = 800;
mChart.Export.Image.PNG.Height = 400;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_{i++:d2}.png");

mChart.Series.Remove(line);


//Area:

Area area = new Area(mChart.Chart);
area.Stairs = true;

area.AreaLines.Visible = true;
area.AreaLines.Color = Color.Red;
area.AreaLines.Width = 2;

area.Add(0, 60);
area.Add(20, 40);
area.Add(40, 60);
area.Add(80, 40);
area.Add(100, 60);

mChart.Series.Add(area);

//No top edge line of area stairs series:

mChart.Export.Image.PNG.Width = 800;
mChart.Export.Image.PNG.Height = 400;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_{i++:d2}.png");

Mth
Newbie
Newbie
Posts: 11
Joined: Thu Dec 30, 2021 12:00 am

Re: Holes in line series

Post by Mth » Mon Nov 28, 2022 8:06 am

Below generated sample pictures:

Holes:
01_line_holes.png
01_line_holes.png (4.64 KiB) Viewed 23511 times
There should be stairs:
02_stairs.png
02_stairs.png (19.67 KiB) Viewed 23511 times
No upper red line:
03_area.png
03_area.png (9.66 KiB) Viewed 23511 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Holes in line series

Post by Christopher » Tue Nov 29, 2022 12:23 pm

Hello,

thank you very much for your concise and reproducible bug report. I have added these issues as separate ones in our issue tracker with id=2571, id=2572, and id=2573. As soon as we have mitigated these errors we will let you know.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Holes in line series

Post by Christopher » Wed Nov 30, 2022 9:51 am

Hello,
Christopher wrote:
Tue Nov 29, 2022 12:23 pm
thank you very much for your concise and reproducible bug report. I have added these issues as separate ones in our issue tracker with id=2571, id=2572, and id=2573.
Just to let you know that there's a presently-existing workaround to two of these issues, namely id=2571 and id=2573, which is the addition of the line:

Code: Select all

mChart.Aspect.ClipPoints = false;
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Mth
Newbie
Newbie
Posts: 11
Joined: Thu Dec 30, 2021 12:00 am

Re: Holes in line series

Post by Mth » Wed Nov 30, 2022 11:47 am

Hello,

Thank you for accepting the reported issues.
I checked the setting you recommended (mChart.Aspect.ClipPoints = false) and it actually fixed the line and the stairs area series. Unfortunately, it is not a universal solution because it causes other types of series that I use to be painted incorrectly, e.g. HorizBar and Gantt, causing them to display outside the Chart axes.
Horizontal.png
Horizontal.png (13.99 KiB) Viewed 23452 times

I look forward to seeing you fix the reported issues.
Best regards

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Holes in line series

Post by Christopher » Fri Dec 02, 2022 4:39 pm

Hello,
I look forward to seeing you fix the reported issues.
I believe the latest NuGets (v.4.2022.12.1) will fix these issues for you.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Mth
Newbie
Newbie
Posts: 11
Joined: Thu Dec 30, 2021 12:00 am

Re: Holes in line series

Post by Mth » Wed Dec 07, 2022 12:48 pm

Hello,

Thanks for the quick fixes. The new version works fine for me.

Best regards

Post Reply