Sign in to follow this  
Fr33z3m4n

Data.xml Request

Recommended Posts

Hi,

 

i use javascript and JSON to create an Chart.

 

 FusionCharts._fallbackJSChartWhenNoFlash();
 var myChart = FusionCharts.render({
 	swfUrl : "charts/{$SWFFile}",
 	width : "100%", 
 	height : chartHeight,
 	debugMode : 0,
 	renderAt : "chartdiv",
 	id : "chartID",
 	dataFormat : "json"
 });
 myChart.setJSONData('{$JSONsrc}');

 

And now, i see at firebug thats an Request to "Data.xml". Why Request FC to an non existing Data.xml ?!

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your post.

 

FusionCharts is programmed to load data from data.xml file, if no data has been provided to chart.

 

It seems that you might not have provided any data to your chart, hence it loads data from data.xml file.

 

Hope this helps.smile.gif

Share this post


Link to post
Share on other sites

hi,

 

it doenst help me.

 

When i use:

 var myChart = FusionCharts.render({
 	swfUrl : "charts/{$SWFFile}",
 	width : "100%", 
 	height : chartHeight,
 	debugMode : 0,
 	renderAt : "chartdiv",
 	id : "chartID",
 	dataFormat : "json",
 	dataSource : '{$JSONsrc}'
 });

no data are displayed, only "reading Data. Please Wait".

 

If i use this:

FusionCharts._fallbackJSChartWhenNoFlash();
 var myChart = FusionCharts.render({
       swfUrl : "charts/{$SWFFile}",
       width : "100%", 
       height : chartHeight,
       debugMode : 0,
       renderAt : "chartdiv",
       id : "chartID",
       dataFormat : "json"
 });
 myChart.setJSONData('{$JSONsrc}');

My Chart is rendering with JSON datas, but chart will load Data.xml.

 

Whats wrong with my code ?

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

Could you please send us the entire code to test it from our end?

 

Awaiting for your reply.

Share this post


Link to post
Share on other sites

Hi,

 

thats the JSON String.

{"chart":{"valuePadding":7,"placeValuesInside":0,"useRoundEdges":1,"shownames":1,"formatNumberScale":0,"showvalues":1,"canvasBgAlpha":100,"showBorder":0,"showLegend":0,"showYAxis":0,"showFCMenuItem":0,"adjustDiv":0,"use3DLighting":0,"numDivLines":4,"divLineIsDashed":1,"decimals":"1","yAxisValueDecimals":"1","forceDecimals":0,"decimalSeparator":",","thousandSeparator":".","inThousandSeparator":",","inDecimalSeparator":".","imageSave":0,"baseFontSize":10,"chartRightMargin":3,"chartLeftMargin":0,"plotSpacePercent":28,"numVisiblePlot":6,"defaultAnimation":1,"animation":1,"palette":1,"labelDisplay":1,"rotateLabels":1,"slantLabels":1,"labelAnglePercent":"45","bgColor":"ffffff","showCanvasBg":0,"canvasBgColor":"ffffff","zeroPlaneThickness":1,"numberSuffix":"%","yaxismaxvalue":50},"styles":{"definition":{"style":[{"name":"myHTMLFont","type":"font","isHTML":1},{"name":"Shadow","type":"Shadow","distance":6,"angle":45},{"name":"fbg","type":"font","bgColor":"#ffffff"}]},"application":{"apply":[{"toObject":"DATALABELS","styles":"myHTMLFont"},{"toObject":"TOOLTIP","styles":"myHTMLFont"},{"toObject":"DataValues","styles":"fbg"}]}},"categories":{"category":[{"name":"SPD","label":"SPD","toolText":"SPD"},{"name":"CDU","label":"CDU","toolText":"CDU"},{"name":"GR\u00dcNE","label":"GR\u00dcNE","toolText":"GR\u00dcNE"},{"name":"FDP","label":"FDP","toolText":"FDP"},{"name":"REP","label":"REP","toolText":"REP"},{"name":"BSG","label":"BSG","toolText":"BSG"},{"name":"B\u00fcrgerForum","label":"B\u00fcrgerForum","toolText":"B\u00fcrgerForum"},{"name":"B\u00fcrgerForum  Seelze","label":"B\u00fcrgerForum Seelze","toolText":"B\u00fcrgerForum  Seelze"},{"name":"DAS LINKSB\u00dcNDNIS","label":"DAS  LINKSB\u00dcNDNIS","toolText":"DAS  LINKSB\u00dcNDNIS"},{"name":"WGW","label":"WGW","toolText":"WGW"},{"name":"Sonstige","label":"Sonstige","toolText":"Sonstige"}]},"dataset":{"set":[{"value":"43.9","color":"FF0000"},{"value":"32.5","color":"000000"},{"value":"10.8","color":"00FF00"},{"value":"7.1","color":"FFFF00"},{"value":0.5,"color":"808080"},{"value":0.1,"color":"00FFFF"},{"value":0.7,"color":"8080FF"},{"value":0.5,"color":"8080FF"},{"value":1.1,"color":"800080"},{"value":0.4,"color":"FF80FF"},{"value":2.5,"color":"c0c0c0"}]}}

 

Vars:

{$SWFFile} = ScrollColumn2D.swf
chartHeight = "100%"

 

Thx for your Help

Edited by Fr33z3m4n

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

We are glad to know that you have managed to resolve your problem.

 

Keep smiling and keep FusionCharting!biggrin.gif

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