|  | 
| How to use SetDashArray in ChartLineStyle | 
| Post Reply   | 
| Author | |
| SimasJ   Newbie   Joined: 22 February 2006 Status: Offline Points: 7 |  Post Options  Thanks(0)  Quote  Reply  Topic: How to use SetDashArray in ChartLineStyle Posted: 01 March 2012 at 12:25pm | 
| 
   Hi, I am sorry but I mistakenly posted this question in a different group. Here is the question: I would like to create a series using a Dash style wider than the standard ones. I found the method SetDashArray in the ChartLineStyle object which appears to be what I need but I cannot find any documentation about it. Would you please provide an example of its usage? Best Regards, Jose Simas | |
|  | |
| SuperMario   Senior Member     Joined: 14 February 2004 Status: Offline Points: 18057 |  Post Options  Thanks(0)  Quote  Reply  Posted: 06 March 2012 at 1:19pm | 
| DashArray you pass in an array with the pattern to follow.  It can be as short or long as you like.  It will follow the pattern you specify, if you specify 3 segments, then it will repeat those 3 segments.  If you specify 1 segment, it will repeat this 1 segment.  You must specify BOTH segment length and gap length or else you will get only a solid line. For example, this is a little bigger than the standard dash: xLineStyle.LineStyle.SetDashArray (Array(5, 2)) this is the pattern: SetDashArray (Array(Segment1 width, first gap width, Segment2 width, second gap width, etc, etc)) These are also valid: xLineStyle.LineStyle.SetDashArray (Array(2, 1, 5, 2)) xLineStyle.LineStyle.SetDashArray (Array(2, 1, 5, 2, 8, 3)) Here is code:     Dim xLineStyle As ChartLineSeriesStyle     Dim nThickness As Integer     nThickness = 5     Set xLineStyle = New ChartLineSeriesStyle     xLineStyle.LineStyle.DashStyle = xtpChartDashStyleCustom     xLineStyle.LineStyle.Thickness = nThickness     xLineStyle.LineStyle.SetDashArray (Array(5, 2))     Set ChartControl.Content.Series(0).Style = xLineStyle Hope this helps | |
|  | |
| SimasJ   Newbie   Joined: 22 February 2006 Status: Offline Points: 7 |  Post Options  Thanks(0)  Quote  Reply  Posted: 12 March 2012 at 3:52pm | 
| 
   Hi, Thanks for the very clear explanation. Solved my problem completely. Cheers, Jose | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |