Hide part of a line

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Wicket
Newbie
Newbie
Posts: 20
Joined: Mon Jan 15, 2007 12:00 am

Hide part of a line

Post by Wicket » Tue Mar 20, 2007 1:38 pm

Let's say I have a normal lineSeries on a chart with, say 10 'points'. Normally one 'line' will be drawn from point 1 to point 2, point 2 to point 3 etc...

But what if I do not want a line do be drawn between point 5 and point 6? I am aware that I can change the color of that 'part of the line', but I'm looking for a way to make it invisible.

I know one way would be to create two series (one from point 1 to 5 and the other from point 6 to 10) but it would make life easier for me if the whole line belonged to the same series, just that part of it was invisible.

Is this possible?

Regards Andreas

Wicket
Newbie
Newbie
Posts: 20
Joined: Mon Jan 15, 2007 12:00 am

Post by Wicket » Tue Mar 20, 2007 1:54 pm

Sorry, I was unaware of the Color.Transparent color. It seems to do the trick.

However, I seem to have found a bug. If I make every other linepart transparent, the complete line becomes transparent. Watch this:
myLine.Add(1,5, Color.White)
myLine.Add(2,7)
myLine.Add(3,2, Color.White)
myLine.Add(4,9)
myLine.Add(5,12, Color.White)
myLine.Add(6,7)
The above correctly draws a line with every other linepart white

myLine.Add(1,5, Color.Transparent)
myLine.Add(2,7)
myLine.Add(3,2, Color.Transparent)
myLine.Add(4,9)
myLine.Add(5,12, Color.Transparent)
myLine.Add(6,7)
The above draws a line completly transparent! (At least for me)

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Mar 20, 2007 2:42 pm

Hi Wicket,

To have a line displayed you would need two visible points. If you make one visible a segment won't be drawn.

To achieve what you request you could draw a transparent point in the middle of the line segment you want to be transparent. Or even at one of the edges of the segment repeating one of the points. One being transparent and the other not.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply