problem with not showing point in line series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Lars Iversen
Newbie
Newbie
Posts: 61
Joined: Wed Jun 22, 2005 4:00 am
Location: cph

problem with not showing point in line series

Post by Lars Iversen » Fri Mar 13, 2009 10:04 am

Hi there

I am using teechart net 2.0.2306.26232 and VB net 2005

I have a problem with the line series, which I hope you can help me with

The problem is a bit special.
If I add a line series that has exactly two points and those points both have the same value (eg. x=3 and Y=10 and X=3 and Y=10) the point is not displayed on the graph. This means that the graph is completely wrong and the end user will not know it.

Is there some kind of work-around?

See code example below.

Thanks in advance
Lars Iversen


Private Sub CreateGraph()

Dim myLineSeries As Steema.TeeChart.Styles.Line
TChart1.Chart.Aspect.View3D = False

'This creates a fine looking line series with 3 points
myLineSeries = New Steema.TeeChart.Styles.Line
myLineSeries.Pointer.Visible = True
myLineSeries.Add(1, 1)
myLineSeries.Add(2, 2)
myLineSeries.Add(3, 5)
TChart1.Series.Add(myLineSeries)

'This creates a line series where one point is added and the line series is displayed fine as one point
myLineSeries = New Steema.TeeChart.Styles.Line
myLineSeries.Pointer.Visible = True
myLineSeries.Add(1, 7)
myLineSeries.Add(3, 9)
TChart1.Series.Add(myLineSeries)

'This creates a line series where I add two points with the exact same values(duplicate)
'The point 3,10 is NOT displayed in the graph at all
myLineSeries = New Steema.TeeChart.Styles.Line
myLineSeries.Pointer.Visible = True
myLineSeries.Add(3, 10)
myLineSeries.Add(3, 10)
TChart1.Series.Add(myLineSeries)

End Sub

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Fri Mar 13, 2009 11:28 am

Hello Lars Iversen,


I think, that your problem is here:

Code: Select all

This creates a line series where I add two points with the exact same values(duplicate)
'The point 3,10 is NOT displayed in the graph at all
myLineSeries = New Steema.TeeChart.Styles.Line
myLineSeries.Pointer.Visible = True
myLineSeries.Add(3, 10)
myLineSeries.Add(3, 10)
TChart1.Series.Add(myLineSeries) 
When you add two points equal to LineSeries, the line is not visible therefore the pointer nor is visible, because the line don't exist. For the reason that, you can not draw a line with two points equal, you needs two differents points for draw a line.

Code: Select all

I recomen that use the next code:
        Dim myPointSeries = New Steema.TeeChart.Styles.Points
        myPointSeries.Add(3, 10)
        myPointSeries.Add(3, 10)
        TChart1.Series.Add(myPointSeries)
Thanks,
Best Regards,
Sandra Pazos / 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

Lars Iversen
Newbie
Newbie
Posts: 61
Joined: Wed Jun 22, 2005 4:00 am
Location: cph

Post by Lars Iversen » Fri Mar 13, 2009 1:47 pm

Hi Sandra

Thanks for your answer. Although it was not really what I was hoping for.
I still mean that if I have a line series and I add one and only one point to it it is displayed correctly as one point. If I add two points they are still displayed correctly with a line between them If I add two identical points nothing is shown at all. I mean the I am entitled to expect that there would be a point visible.

Anyway I have gone ahead and solved it by looping through all my series in the graph. If any series has two identical values as the two last items I delete the last item and now my graph is shown ok. Also including the single points that where "secret" before.

Br
Lars Iversen

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

Post by Narcís » Fri Mar 13, 2009 5:11 pm

Hi Lars,

Ok, I've added your request to the wish-list to be considered for inclusion in future releases.
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

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

Post by Narcís » Fri Mar 13, 2009 5:20 pm

Hi Lars,

As an update, I've checked this works fine using latest TeeChart for .NET v3 maintenance release available with your code. You may want to check the fully functional evaluation version here:

http://www.steema.com/downloads/form_tch_net.html
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