.net8.0 console project,
Steema.TeeChart.NET.Pro (4.2024.7.29)
Hello,
In the example below there are two problems:
1. A line that should be smooth is jagged. Some unexpected line points are displayed.
2. Displaying values as time in the bottom axis labels does not work when smoothing is turned on.
Code: Select all
using Steema.TeeChart;
using Steema.TeeChart.Styles;
var mChart = new TChart();
mChart.Aspect.View3D = false;
mChart.Header.Visible = false;
mChart.Legend.Visible = false;
Line line = new Line(mChart.Chart);
line.LinePen.Width = 2;
line.Color = System.Drawing.Color.Green;
line.Smoothed = true;
line.XValues.DateTime = true; // Does not work when smoothing is enabled
line.Add(new DateTime(2024, 04, 30, 12, 00, 00).ToOADate(), 12.5);
line.Add(new DateTime(2024, 04, 30, 12, 00, 30).ToOADate(), 52.5);
line.Add(new DateTime(2024, 04, 30, 12, 01, 00).ToOADate(), 32.5);
line.Add(new DateTime(2024, 04, 30, 12, 01, 30).ToOADate(), 22.5);
line.Add(new DateTime(2024, 04, 30, 12, 02, 00).ToOADate(), 46.5);
line.Add(new DateTime(2024, 04, 30, 12, 02, 30).ToOADate(), 5.5);
line.Add(new DateTime(2024, 04, 30, 12, 03, 00).ToOADate(), 35.5);
line.Add(new DateTime(2024, 04, 30, 12, 03, 30).ToOADate(), 20);
line.Add(new DateTime(2024, 04, 30, 12, 04, 00).ToOADate(), 40);
line.Add(new DateTime(2024, 04, 30, 12, 04, 30).ToOADate(), 10);
mChart.Series.Add(line);
mChart.Export.Image.PNG.Width = 800;
mChart.Export.Image.PNG.Height = 400;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\SmoothLine.png");