The line extends beyond the chart area
Posted: Tue Apr 04, 2023 1:59 pm
Visual Studio 2022,
.net7.0 console project,
Steema.TeeChart.NET.Pro (4.2023.3.13)
Best regards
.net7.0 console project,
Steema.TeeChart.NET.Pro (4.2023.3.13)
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 = 50;
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 = new Line(mChart.Chart);
line.LinePen.Width = 2;
line.Color = System.Drawing.Color.Green;
line.Add(0, 60);
line.Add(20, 40);
line.Add(40, 60);
line.Add(80, 40);
line.Add(100, 60);
mChart.Series.Add(line);
mChart.Export.Image.PNG.Width = 800;
mChart.Export.Image.PNG.Height = 400;
mChart.Export.Image.PNG.Save($"D:\\TeeChartTest\\chart_1.png");
Best regards