Page 1 of 1
DashPattern for Custom DashStyle line series?
Posted: Tue Nov 21, 2006 2:06 pm
by 9346394
I have a Line series that I am attempting to set the Style to be the System.Drawing.Drawing2D.Custom DashStyle.
It does not appear that the chart is plotting the line using the DashPattern that I set under the .LinePen.DrawingPen.DashPattern property.
The line in the chart looks to be nothing but single dots no matter what I set the DashPattern to.
Is there something I am missing that needs to be done or set to get the chart to use my custom DashPattern other than setting the .LinePen.DrawingPen.DashStyle to custom and assing the .DashPattern?
I also tried setting the .LinePen.Style to Custom as well.
Neither setting appears to force the chart to pick up the DashPattern.
Thanks.
Posted: Tue Nov 21, 2006 2:52 pm
by narcis
Hi Aaron,
It works fine for me here using this:
Code: Select all
line1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
Have you tried if this works at your end?
Posted: Tue Nov 21, 2006 2:59 pm
by 9346394
The code that you show there works just fine for the 5 pre-defined dash styles (Solid, Dash, Dot, DotDash and DotDotDash).
However, the option that I was asking about which is NOT working is the System.Drawing.Drwaing2D.DashStyle.CUSTOM.
When you select Custom, you should be allowed to specify a DashPattern within the line1.LinePen.DrawingPen.DashPattern property but the chart does not appear to be using that custom pattern to draw the line.
We need more than 5 styles of lines for the plotting that we want to do.
This is why we are trying to use the DashStyle.Custom option to specify how the line will appear.
Posted: Wed Nov 22, 2006 12:10 pm
by narcis
Hi Aaron,
Yes, you are right, DashPattern is not considered. We have already added this for the next maintenance release.
Posted: Wed Nov 22, 2006 1:57 pm
by 9346394
Thanks again for the response.
Is there a schedule for the maintenance release?
Or at least a general idea of how often they typically occur?
We are in the process of evaluating how well the .NET version of TeeChart will meet our plotting needs for a new application we wish to develop. The addition of custom line styles using the DashPattern will be a very helpful addition and it would be good for us to know when that might get implemented.
Thanks.
Posted: Wed Nov 22, 2006 2:44 pm
by narcis
Hi Aaron,
We expect to have the next release ready for the first week of December. Please be aware at this forum for new releases announcements.
Posted: Fri Dec 22, 2006 1:36 pm
by narcis
Hi Aaron,
FYI, we have posted a new maintenance release at the client area which includes DashPattern property support.
Posted: Thu Jan 04, 2007 1:50 pm
by 9346394
I have installed the newest eval version to attempt to test the DashPattern support.
The new version seems to be performing exactly the same way the old one was.
Do you have an sample that demonstrates the new DashPattern support so I can see how this is implemented and used? I just want to make sure I am attempting to use what you folks added with this update.
Thanks.
Posted: Thu Jan 04, 2007 2:37 pm
by narcis
Hi Aaron,
Sure, it works like this:
Code: Select all
line1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.Custom;
line1.LinePen.DashPattern = new float[] { 4.0F, 2.0F, 1.0F, 3.0F };
Posted: Thu Jan 04, 2007 2:59 pm
by 9346394
Ok that did it.
I was referencing the property as LinePen.DrawingPen.DashPattern in the code that I had been trying.
That property does exist but does not change the appearance of the line style like the new LinePen.DashPattern does.
Thanks for helping me figure that one out.