Jonathan Report post Posted December 13, 2011 Hello! I have created a MSBar3D chart and it works fine as it is, but i would to make the labeltext a simple link. I researched some and found an example which looked like this: <category label="<a href='http://www.fusioncharts.com'> Jan </a>" /> but when i try the same i get the error invalid data. This is the xml i am using: <chart caption='Business Results: 2005' yAxisName='Revenue (Millions)' canvasBgColor='FEFEFE' canvasBaseColor='FEFEFE' toolTipBgColor='DEDEBE' toolTipBorder='889E6D' divLineColor='999999' showColumnShadow='0' divLineIsDashed='1' divLineDashLen='1' divLineDashGap='2' numberPrefix='$' numberSuffix='M' chartRightMargin='30'> <categories> <category label='<a href='http://www.fusioncharts.com'> Jan </a>'/> <category label='Software' /><category label='Service' /> </categories> <dataset seriesname='Domestic' color='8EAC41'> <set value='84' /> <set value='207' /> <set value='116' /> </dataset> <dataset seriesname='International' color='607142' > <set value='116' /> <set value='237' /> <set value='83' /> </dataset> </chart> It works if i use this string for the label: <category label='<a href='http://www.fusioncharts.com'> Jan </a>'/> But the label looks as follows and is not a link: <a href='http://www.fusioncharts.com'> Jan </a> How should the link in the label be written for it to work properly? /Jonathan Share this post Link to post Share on other sites
Guest Angshu Report post Posted December 13, 2011 Hi, Thanks for your post. Please find the sample XML code attached for your reference. Hope this helps. CategoryLink.xml Share this post Link to post Share on other sites
Jonathan Report post Posted December 13, 2011 Hello The example i was talking about in my first post was exactly the same as you gave me now, and it wont work. I am probably doing something wrong. /Jonathan Share this post Link to post Share on other sites
Guest Angshu Report post Posted December 13, 2011 Hi, Thanks for your response. You would need to apply STYLES in order to make it work. Your XML code is missing the STYLE part. Also, you would need to encode some special characters like: <category label="<a href='http://www.fusioncharts.com'> Jan </a>" /> Hope this helps. Share this post Link to post Share on other sites
Jonathan Report post Posted December 13, 2011 Hello It was my intetion to provide an encoded link in my first post but i guess something went wrong so i will do it now instead. The chart renders when i use this in the XML code: <category label='< ;a href=' ;http://www.fusioncharts.com' ;> ; Jan < ;/a> ;'/> But the label dont become a link instead it just displays the whole text as following on the chart: <a href='http://www.fusioncharts.com'> Jan </a> On a sidenote: Are you sure that I need styles to make it work? I still dont have the styles tags and it renders now. /Jonathan Share this post Link to post Share on other sites
Guest Angshu Report post Posted December 13, 2011 Hi, Thanks for your response. Yes, the chart would render without the STYLE, but you would need to use it in order to make the label as link. Please find the screenshots attached for your reference. Hope this helps. Share this post Link to post Share on other sites
Jonathan Report post Posted December 13, 2011 Hello! Thank you for you help, it works now. I didn't realise that the style would affect how fusionchart handled html code in texts. /Jonathan Share this post Link to post Share on other sites
Jonathan Report post Posted December 19, 2011 Hello again! I have encountered a new problem related to links in labels. The problem appears when i have long labels, and the fusioncharts trims the label and inserts three dots (Long Labe...) . It seems that fusioncharts wont translate the html tags when this happens. So if i have a label looking like this: '<a href='http://www.fusioncharts.com'> Jan </a>' it will display the text Jan in the chart and be a link to http://www.fusioncharts.com. But when the label is long and the chart starts to display ellipses it will still display the correct label but it is not a link anymore and when the toolText displays '<a href='http://www.fusioncharts.com'> Jan </a>'. I tried to set the flag useEllipsesWhenOverflow to 0 but it wont solve the problem. Are the isHtml style not compatible with any type of "label overflow"? Or am I doing something wrong? /Jonathan Share this post Link to post Share on other sites
Guest Angshu Report post Posted December 20, 2011 Hi, Thanks for your response. Could you please send us the XML code to look into the issue? Awaiting for your response. Share this post Link to post Share on other sites
Jonathan Report post Posted December 20, 2011 Hello I attached an example xml which produces the problem, it is not the actual xml I am using. The problem appears on the label with the name ___________________Long label____________________ I am using a MSBar3D chart and the height and width are both 500. /Jonathan ExampleXML.xml Share this post Link to post Share on other sites