Sign in to follow this  
Vigyano

How to set URL

Recommended Posts

Hi,

 

 

 

I am using FusionCharts in ASP.NET/C#.

 

 

 

How to set URL for each text that appears on xAxis or yAxis?

 

 

 

Eg: I'm using Bar2D and I used objChartDataFormatter.GetSingleSeriesXml() to return XML as follows:

 

{<chart xAxisName='Texts' yAxisName='Percentage' lineColor='#2B78DD' showValues='1' rotateLabels='1' slantLabels='1' useRoundEdges='1' labelStep='1' palette='3' use3DLighting='1' >

 

<set label='Text1' value='100'/>

 

<set label='Text2' value='85'/>

 

<set label='Text3' value='71'/>

 

</chart>}

 

 

 

 

 

 

 

If I use Link="abc.aspx?id=111", then URL is set for the bar graph,

 

but I want to set a URL for the "label" (i.e) for Text1, Text2, Text3.

 

 

 

Can anyone help me out on this?

 

 

 

Thanks.

Share this post


Link to post
Share on other sites

Hi,

I am afraid this  can not be done directly using any attribute. But you can try some hacks by setting the label style as HTML text and add an HTML link <A> as a label.

We have an example,

<graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' decimals='0' formatNumberScale='0' labelDisplay='Rotate'>

  <set label='<a href="http://FusionCharts.com" >Jan </a>' value='462' />

  <set label='<a href="http://FusionCharts.com" >Feb </a>' value='857' />

  <set label='<a href="http://FusionCharts.com" >Mar </a>' value='671' />

  <set label='<a href="http://FusionCharts.com" >Apr </a>' value='494' />

  <set label='<a href="http://FusionCharts.com" >May </a>' value='761' />

 <styles>

<definition>

<style name='mystyle' type='font' underline='1' color="FF0000" isHTML='1' />

</definition>

<application>

<apply toObject='datalabels' styles='mystyle' />

</application>"

 </styles>

</graph>

Share this post


Link to post
Share on other sites

I tried but it is not working if I have "href" in the label.

 

If I remove "href" from anchor element then the text is displayed as a link, but it is not clickable.

 

 

 

Any ideas?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this