Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Chart > Links for XAxis items
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Links for XAxis items

Feed from this thread
  • Alex avatar

    Posted on Apr 19, 2011 (permalink)

    Hi guys,

    What I am trying to do is add for the XAxis some items to be displayed something like

    RadChart.PlotArea.XAxis.AddItem("Friday");
    or 
    RadChart.PlotArea.XAxis[0].TextBlock.Text = "Friday";

    , but Instead of simple text I  want this Items to be links or asp:buttons.

    Is this possible?

    Regards,
    Alex

  • Evgenia Evgenia admin's avatar

    Posted on Apr 21, 2011 (permalink)

    Hi Alex,

    You can use the ChartAxisItem.ActiveRegion.Url property to specify the url you would like to open on axis item label click. The following sample code snippet demonstrates this:
    protected void RadChart1_BeforeLayout(object sender, EventArgs e)  
    {  
        ChartAxisItem axisItem = this.RadChart1.PlotArea.XAxis.Items[0];  
        axisItem.ActiveRegion.Url = "http://www.telerik.com";  
        axisItem.ActiveRegion.Tooltip = "Telerik";  
        axisItem.ActiveRegion.Attributes = "target=_blank";  
    }

    All the best,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Chart > Links for XAxis items