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

HYperlink/Image in Xaxis Label

1 Answer 63 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Mahesh
Top achievements
Rank 1
Mahesh asked on 23 Oct 2008, 03:12 PM
Hi,

I need to have a label / Text which should act as a hyper link in the x-axis label. Currently this supports only string as i know.

One more question is, if i need to add any image object to the x-axis label, how that can be done?

Help is highly appreciated.

Thanks
Mahesh

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 24 Oct 2008, 11:10 AM
Hi Mahesh,

You can use the ChartAxisItem.ActiveRegion.Url property to specify the url you would like to open on axis item label click. As for the image question -- RadChart only supports adding background images to the axis item labels:

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"
 
    ChartAxisItem axisItem2 = this.RadChart1.PlotArea.XAxis.Items[1]; 
    axisItem2.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Image; 
    axisItem2.Appearance.FillStyle.FillSettings.BackgroundImage = "image.jpg"


We have attached a sample application that demonstrates both approaches.


Regards,
Manuel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Mahesh
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or