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)
Legend - Points Series Not Showing
Hmmm...
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...?
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...?
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.
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.
Pep Jorge
http://support.steema.com
http://support.steema.com
workaround
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.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.
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).
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
http://www.steema.com