For LinePen.Style=Dotted,
If bottom axis with is more the dotted line show properly,
if the bottom axis width is less the dotted line is not shown properly , it shown as solid line,
I have attached the Screenshot , please provide the solution to solve the issue
Issue with LinePen.Style
Issue with LinePen.Style
- Attachments
-
- DottedLine.png (35.58 KiB) Viewed 7434 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Issue with LinePen.Style
Using the latest version of TeeChart and the following code:gilbert wrote:I have attached the Screenshot , please provide the solution to solve the issue
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Line line = new Line(tChart1.Chart);
line.Add(0, 50);
line.Add(10, 50);
tChart1.Axes.Left.SetMinMax(0, 100);
line.LinePen.Width = 3;
line.LinePen.Style = DashStyle.Dash;
}
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 |
Re: Issue with LinePen.Style
Please add these many points and reduce the width, as shown in the picture
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Line line = new Line(tChart1.Chart);
line.Add(0, 50);
line.Add(0, 50);
line.Add(1, 50);
line.Add(2, 50);
line.Add(3, 50);
line.Add(4, 50);
line.Add(5, 50);
line.Add(6, 50);
line.Add(7, 50);
line.Add(8, 50);
line.Add(9, 50);
line.Add(10, 50);
tChart1.Axes.Left.SetMinMax(0, 100);
line.LinePen.Width = 3;
line.LinePen.Style = DashStyle.Dash;
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Line line = new Line(tChart1.Chart);
line.Add(0, 50);
line.Add(0, 50);
line.Add(1, 50);
line.Add(2, 50);
line.Add(3, 50);
line.Add(4, 50);
line.Add(5, 50);
line.Add(6, 50);
line.Add(7, 50);
line.Add(8, 50);
line.Add(9, 50);
line.Add(10, 50);
tChart1.Axes.Left.SetMinMax(0, 100);
line.LinePen.Width = 3;
line.LinePen.Style = DashStyle.Dash;
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Issue with LinePen.Style
Hi gilbert,
Thanks for your feedback.
The difference here is in the number of points that need to be plotted. Christopher Ireland only added two points to the series. A line segment needs to be painted between those 2 points and the segment is long enough to be able to fit the dashed pen. You are adding a much higher number of points within the same X values range and chart width. This means a higher number of point to point segments that need to be painted and that those segments will be much shorter. Therefore, with a narrower chart, there won't be enough space for the segments to be painted as dashed lines as segments overlap. Given that, you can improve that behavior decreasing LinePen.Width and setting LinePen.DashCap to Triangle, for example:
Thanks for your feedback.
The difference here is in the number of points that need to be plotted. Christopher Ireland only added two points to the series. A line segment needs to be painted between those 2 points and the segment is long enough to be able to fit the dashed pen. You are adding a much higher number of points within the same X values range and chart width. This means a higher number of point to point segments that need to be painted and that those segments will be much shorter. Therefore, with a narrower chart, there won't be enough space for the segments to be painted as dashed lines as segments overlap. Given that, you can improve that behavior decreasing LinePen.Width and setting LinePen.DashCap to Triangle, for example:
Code: Select all
line.LinePen.Width = 2;
line.LinePen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
line.LinePen.DashCap = System.Drawing.Drawing2D.DashCap.Triangle;
Best Regards,
Narcís Calvet / 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 |