Jump to content
Software FX Community

GetPointLabel event with Gantt Chart


User (Legacy)

Recommended Posts

Hello, I'm using the latest updated version of ChartFX 6.2 for .NET.

I'm building a multi-series Gantt chart with the cluster property on - so i

can see multiple states per bar segment over time.

The Point.Tag property and TipMask with %L is working great to display

custom formatted tooltips for each bar/point - that is working great.

However, I want to add a point label of a different text to some of the

points - from what I read, the GetPointLabel event should do what I need -

and I can get it to fire - but setting the e.Label property seems to have no

effect...

The following code seems to have no impact on the labels - no labels

appear... am I missing something?? THANKS!

Private Sub Chart_GetPointLabel(ByVal sender As Object, ByVal e As

SoftwareFX.ChartFX.PointLabelEventArgs) Handles Chart.GetPointLabel

e.Label = "Test Label"

e.Handled = True 'how should I set this?

End Sub

Link to comment
Share on other sites

The GetPointLabel event only gets fired if the Notify Style flag in the Axis 

object (Y-Axis in this case) is ON.

To turn this flag on you can do:

chart1.AxisY.Style |= AxisStyle.Notify;

One question though: Why don't you use the same approach with the Tag

property to label those special points ? You can just set the Tag different

for those points and hence the PointLabel will be different.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

  • 2 weeks later...

My goal was to have different tooltips than labels - and I'm using the Tag 

property for the tooltip text, so it wouldn't work for the point labels.

I was able to get around this by using the Annotation extension - THANKS for

your help.

"Software FX Support" <support@softwarefx.com> wrote in message

news:1iY0E8WqEHA.3120@webserver3.softwarefx.com...

> The GetPointLabel event only gets fired if the Notify Style flag in the

> Axis object (Y-Axis in this case) is ON.

>

> To turn this flag on you can do:

>

> chart1.AxisY.Style |= AxisStyle.Notify;

>

> One question though: Why don't you use the same approach with the Tag

> property to label those special points ? You can just set the Tag

> different for those points and hence the PointLabel will be different.

>

> --

> FP

> Software FX, Inc.

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...