Page 1 of 1

Holes in line series

Posted: Fri Nov 25, 2022 3:05 pm
by 15692702
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");

Re: Holes in line series

Posted: Mon Nov 28, 2022 8:06 am
by 15692702
Below generated sample pictures:

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

Re: Holes in line series

Posted: Tue Nov 29, 2022 12:23 pm
by Christopher
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.

Re: Holes in line series

Posted: Wed Nov 30, 2022 9:51 am
by Christopher
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;

Re: Holes in line series

Posted: Wed Nov 30, 2022 11:47 am
by 15692702
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 22877 times

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

Re: Holes in line series

Posted: Fri Dec 02, 2022 4:39 pm
by Christopher
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.

Re: Holes in line series

Posted: Wed Dec 07, 2022 12:48 pm
by 15692702
Hello,

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

Best regards