using $strXML not working
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



using $strXML not working Expand / Collapse
Author
Message
Posted 11/19/2007 3:13:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/19/2007 9:46:08 AM
Posts: 3, Visits: 8
I'm in pre-purchasing fase, trying to get things working.

While dataURL works fine, strXML doesn't.

I specific want to use the strXML-method, just because I don't want every graph to be build by a fysically file on my server.

When using strXML and renderchart I get:

debug error: Could not find dataxml or dataurl

any comments on this code?

$strXML=

<chart palette='4' caption='Bruto inkomen' subcaption='overlijden relatie' xAxisName='jaar' yAxisName='bruto inkomen' numberPrefix='€' showValues='0' decimals='0' ><categories><category name='42' /><category name='43' /><category name='44' /></categories><dataset seriesName='Norm' ><set value='57000' /><set value='57000' /><set value='57000' /></dataset><dataset seriesName='Bruto'><set value='57000' /><set value='25091' /><set value='25091' /></dataset></chart>

execute=

echo renderChart("MSCombi2D.swf","",$strXML, "productSales", 600, 300, true, false);
Post #3084
Posted 11/19/2007 5:18:36 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2 days ago @ 5:36:20 AM
Posts: 736, Visits: 1,181
Hi,

I dataXML special characters like € are to be URL encoded ....

instead of this use :

numberPrefix='%E2%82%AC'

this migh help.

Regards,

Sudipto Choudhury
FusionCharts Team

Post #3086
Posted 11/19/2007 6:34:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/19/2007 9:46:08 AM
Posts: 3, Visits: 8
Hi,

Changing the € to x (no encoding needed) doesn't make things working.

thkz anyway

Harry

Post #3088
Posted 11/19/2007 7:32:53 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2 days ago @ 5:36:20 AM
Posts: 736, Visits: 1,181
Hi,

I have tried your code in a php file and its working properly...

<HTML>
<HEAD>
<script type="text/javascript" language="javascript" src="FusionCharts.js"></script>
</HEAD>
<body>
<?php
include("FusionCharts.php");
 $strXML="<chart palette='4' caption='Bruto inkomen' subcaption='overlijden relatie' xAxisName='jaar' yAxisName='bruto inkomen' numberPrefix='€' showValues='0' decimals='0' ><categories><category name='42' /><category name='43' /><category name='44' /></categories><dataset seriesName='Norm' ><set value='57000' /><set value='57000' /><set value='57000' /></dataset><dataset seriesName='Bruto'><set value='57000' /><set value='25091' /><set value='25091' /></dataset></chart>";
echo renderChart("MSCombi2D.swf","",$strXML, "productSales", 600, 300, false, false);
   
 
?>
</body>
</HTML>

can you please send your code so that we can debug?

Regards,

Sudipto Choudhury
FusionCharts Team

Post #3089
Posted 11/19/2007 8:18:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/19/2007 9:46:08 AM
Posts: 3, Visits: 8
this is the complete code:

<?php
//You need to include the following JS file, if you intend to embed the chart using JavaScript.
//Embedding using JavaScripts avoids the
"Click to Activate..." issue in Internet Explorer
//When you make your own charts, make sure that the path to this JS file is correct. Else, you would get JavaScript errors.

session_start();
include(
"../Fusions/Code/PHP/Includes/FusionCharts.php");
?>
<SCRIPT LANGUAGE="Javascript" SRC="../Fusions/JSClass/FusionCharts.js"></SCRIPT>
<?

$strXML =
"&ltchart palette='4' caption='Bruto inkomen' subcaption='overlijden relatie' xAxisName='jaar' yAxisName='bruto inkomen' numberPrefix='x' showValues='0' decimals='0' &gt";



$strCategories =
"&ltcategories&gt";

for ($x =
0; $x < $_SESSION['eindgrafiek']; $x++) {
$strCategories.=
"&ltcategory name='" . $_SESSION['jaar']['klp_lft'][$x] . "' /&gt";
}
$strCategories .=
"&lt/categories&gt";

//renderAs='Area'
$strDataset1 =
"&ltdataset seriesName='Norm' &gt";
for ($x =
0; $x < $_SESSION['eindgrafiek']; $x++) {
$strDataset1.=
"&ltset value='" . $_SESSION['jaar']['norm'][$x] . "' /&gt";
}
$strDataset1 .=
"&lt/dataset&gt";

$strDataset2 =
"&ltdataset seriesName='Bruto'&gt";
for ($x =
0; $x < $_SESSION['eindgrafiek']; $x++) {
$strDataset2.=
"&ltset value='" . $_SESSION['jaar']['jaarx'][$x] . "' /&gt";
}
$strDataset2 .=
"&lt/dataset&gt";
$strXML .= $strCategories . $strDataset1 . $strDataset2 .
"&lt/chart&gt";
?><br><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<?
//echo $strXML;
// in de produktieversie?
echo renderChart(
"MSCombi2D.swf","",$strXML, "productSales", 600, 300, true, false);

Post #3090
Posted 11/24/2007 12:01:48 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2 days ago @ 5:36:20 AM
Posts: 736, Visits: 1,181
HI,

Can you please try replacing the &lt with < and &gt with > as normal XML would be...that will do the trick..

Regards,

Sudipto Choudhury
FusionCharts Team

Post #3167
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 10:59am


Execution: 0.156.