Legend - Points Series Not Showing

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Patrick
Newbie
Newbie
Posts: 5
Joined: Wed Feb 04, 2004 5:00 am
Contact:

Legend - Points Series Not Showing

Post by Patrick » Wed Sep 15, 2004 11:40 pm

I am creating a chart programatically as follows:

Dim Chart As New TChart

With Chart
.Legend.Visible = True
.Legend.Alignment = LegendAlignments.Top
.Legend.LegendStyle = LegendStyles.Series
End With

I add 3 Steema.TeeChart.Styles.Points series, of Triangle, DiagCross, and DownTriangle.

My legend shows the text for all 3 series, but only the DiagCross image is shown in the legend. The space where the Triangle and DownTriangle should be is blank.

All 3 series show up fine on the chart. What am I doing wrong?

FYI I am using the latest version (v1.1.1675.27998)

Patrick
Newbie
Newbie
Posts: 5
Joined: Wed Feb 04, 2004 5:00 am
Contact:

Hmmm...

Post by Patrick » Wed Sep 15, 2004 11:45 pm

A correction, which only makes this worse.

If I use top alignment for the legend, NONE of the images for the series show.

If I use the default right alignment, only the DiagCross shows.

Seems like a bug to me...?

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Sep 16, 2004 8:12 am

Hi Patrick,

yes, there's a known bug. The problem is that the symbols are painted on other place around the Chart panel. We'll try to fix this bug for the next maintenance releases.

Patrick
Newbie
Newbie
Posts: 5
Joined: Wed Feb 04, 2004 5:00 am
Contact:

workaround

Post by Patrick » Thu Sep 16, 2004 11:40 am

Pep wrote:Hi Patrick,

yes, there's a known bug. The problem is that the symbols are painted on other place around the Chart panel. We'll try to fix this bug for the next maintenance releases.
Is there any workarounds? My customers have been requesting the additon of a legend to my charts, and with this bug I am unable to fufill this request.

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu Sep 16, 2004 3:21 pm

Hi, Patrick.

I was able to replicate the problem here. But it only occurs when cross, diagonal cross or start pointer styles are used.

The bug is located in the Custom.cs unit, the DrawCross, DrawDiagonalCross methods. The actual drawing code in these methods assumes chart is always in 3d -> for 2d charts you'll end up with pointers shown at wrong place. I've just fixed the problem - the fix will be included in next maintenance release. In the meantime, the only workarounds I can think of is:

1) If you have TC .NET sources, change the DrawCross and DrawDiagonalCross implementations (I can send you updated unit).
2) Don't use the above three pointer styles.
3) Manually draw pointers directly on legend (I think there is an example of something similar in TeeChart demo - the custom drawing on legend example).
Marjan Slatinek,
http://www.steema.com

Post Reply