luftikus143

Tool tip in multiple lines

Recommended Posts

hello i'm trying to show my tool tips in 2 lines but, the example in the documentation doesn't work, the error message is: Invalid XML Data.

 

 

 

Thanks!!

Edited by Guest

Share this post


Link to post
Share on other sites

Hi i have also problem with multi-line tooltips i php. Please se the code snip, direct copy from the doc.

<?php

//We've included ../Includes/FusionCharts.php, which contains functions

//to help us easily embed the charts.

  include("FusionCharts/FusionCharts.php");

?>

<HTML>

<HEAD>

  <TITLE>FusionCharts - Simple Column 3D Chart using dataXML method</TITLE>

</HEAD>

<BODY>

<?php

//Create an XML data document in a string variable

$strXML  = "";

$strXML .= "<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0'   formatNumberScale='0' showBorder='1'>";

$strXML .= "<set label='Jan' value='462' tooltext='John Miller<BR>Score: 420<BR>Rank:2'/>";

$strXML .= "<set label='Feb' value='857' tooltext='John Miller<BR>Score: 420<BR>Rank:2'/>";

$strXML .= "<set label='Mar' value='671' />";

$strXML .= "<set label='Apr' value='494' />";

$strXML .= "<set label='May' value='761' />";

$strXML .= "<set label='Jun' value='960' />";

$strXML .= "<set label='Jul' value='629' />";

$strXML .= "<set label='Aug' value='622' />";

$strXML .= "<set label='Sep' value='376' />";

$strXML .= "<set label='Oct' value='494' />";

$strXML .= "<set label='Nov' value='761' />";

$strXML .= "<set label='Dec' value='960' />";

$strXML .= "<styles>";

$strXML .= "<definition>";

$strXML .= "<style name='myHTMLFont' type='font' isHTML='1' />";

$strXML .= "</definition>";

$strXML .= "<application>";

$strXML .= "<apply toObject='TOOLTIP' styles='myHTMLFont' />";

$strXML .= "</application>";

$strXML .= "</styles>";

$strXML .= "</chart>";

//Create the chart - Column 3D Chart with data from strXML variable using dataXML method

echo renderChartHTML("FusionCharts/Column2D.swf", "", $strXML, "myNext", 600, 300, true);

?>

</BODY>

</HTML>

I get the following error:

INFO: XML Data provided using dataXML method.

INFO: XML Data provided using dataXML method.

ERROR: Invalid XML encountered. An attribute value is not properly terminated. Check the XML data that you've provided. If you've special characters in your XML (like %, &, ' or accented characters), please URL Encode them.

It's working fine when i use html only...

/kent

Share this post


Link to post
Share on other sites

Some times you just have to read the documentation.

I figured out what you mend with the dataURL metod, and then there is no problem.

This is a very nice piece of software. :-)

/kent

Share this post


Link to post
Share on other sites

sorry but, i've just try to copy the example again but it doesn't work.

 

i'm using fusioncharts developer, i don't know if it's impossible to use it. The error message i receive is: "Invalid XML Data"

 

The example works well when i don't insert "<BR>"

 

 

 

Thanks!!

Share this post


Link to post
Share on other sites

Finally i managed to put in multiple lines the tool-tip!!!!

 

 

 

you have to url encode the simbol '&'

 

 

 

 

 

$amp=urlencode('&');

 

"toolText='Jhon".$amp."lt;BR".$amp."gt;Miller'"

Edited by Guest

Share this post


Link to post
Share on other sites

Hi there,

 

 

 

I want my info to be displayed in two lines in the tooltip too.

 

 

 

I tried to follow the instructions, but it didn't work.

 

 

 

I use the dataURL method:

    var chart = new FusionCharts("http://localhost/etc/FusionCharts_Evaluation/Charts/Bubble.swf", "ChartId", "800", "700", "0", "0");

   chart.setDataURL("fusioncharts_1-data.php");

   chart.render("chartdiv");

 

 

 

And I have this in the XML:

    name="Albania  <BR>   x=1207 y=75"

 

 

 

But it displays it in the tooltip like

    Albania  < BR >   x=1207 y=75

(without spaces around the BR)

 

 

 

 

 

Can anyone give me a hint? I specified too the as described above... Is this mandatory?

 

 

 

Thanks for any advice!

 

 

 

EDIT: Okay, okay... Internal problem with XML coding yielded in not proper functioning. Alright now. Sorry for any confusion!

Edited by Guest

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