This is a migrated thread and some comments may be shown as answers.

Tooltip for bar label - not the bar itself

1 Answer 16 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 27 Aug 2011, 12:10 AM
Hi:

I have a bar chart with really long labels (e.DataPoint.XCategory).  Where they are over 30 characters, I'm truncasting them to 30 in the ItemDataBound event I would like to show the full string as a tooltip when the user mouses over the label.  I'm using the item tooltip to show the numeric value for the bar, so it's already being used.  Is that possible?  If not, is there a way to concatenate the X value and the tooltip text to show both as a tooltip in these cases?  I would prefer to do this programatically.

Thanks,

Terry

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 31 Aug 2011, 12:52 PM
Hi Terry,

You can concatenate the XCategory and the tooltip text using the #XCAT format expression and the ItemTooltipFormat property of the SeriesDefinition. Here is how to do this:

seriesMapping.SeriesDefinition.ShowItemToolTips = true;
seriesMapping.SeriesDefinition.ItemToolTipFormat = "Open: #XCAT and other sample text";

Greetings,
Evgenia
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Chart
Asked by
Terry
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or