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

Display tooltip on XAxis

1 Answer 74 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
piro
Top achievements
Rank 1
piro asked on 14 Jul 2009, 02:16 AM
I have a problem with display tooltip cho XAxis Item  need you help.
 
I can  display tooltip  on  ChartSeriesItem with  command :
  ChartSeriesItem seriesItem = new ChartSeriesItem();
  seriesItem.ItemMap.ToolTip = "test";
 But i can't do this with XAxis item . I want  that, when i  click mouse over XAxit item, it will display full name of XAxit item.

Please help me solve this problem . Thanks so much !

1 Answer, 1 is accepted

Sort by
0
Velin
Telerik team
answered on 16 Jul 2009, 09:26 AM
Hi Piro,

To attach tooltips to the XAxis items you should register for the RadChart BeforeLayout event. Here is a sample code:
RadChart1.BeforeLayout += new EventHandler<EventArgs>(RadChart1_BeforeLayout); 
    void RadChart1_BeforeLayout(object sender, EventArgs e) 
    { 
        foreach (var item in RadChart1.PlotArea.XAxis.Items) 
        { 
            item.ActiveRegion.Tooltip = "Item " + RadChart1.PlotArea.XAxis.Items.IndexOf(item); 
        } 
    } 

Hope this helps!

Regards,
Velin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart (Obsolete)
Asked by
piro
Top achievements
Rank 1
Answers by
Velin
Telerik team
Share this question
or