Remi Gelinas

data.xml invoked before dataURL

Recommended Posts

Hello,

 

I am using a licensed version of FusionCharts v3.2.1. I am embedding a chart with JSON data that I provide through the dataURL method. My problem is that often, the chart try to load the data.xml file (which obviously end in a 404 error) and after it load the data successfully from the url provided. The resulting chart works and display correctly, but browsers show an annoying error to the user because a resource failed to load.

 

Any idea of what I can do?

 

Thanks

 

 

EMBEDING CODE:

 

<!-- START Script Block for Chart DisplayGraph01 -->

<div id='DisplayGraph01Div' >

Chart.

</div>

<script type="text/javascript">

var chart_DisplayGraph01 = new FusionCharts({"dataFormat" : "jsonurl", "renderAt" : "DisplayGraph01Div", "debugMode" : "1", "swfUrl" : "/FusionCharts/Column3D.swf", "id" : "DisplayGraph01", "wMode" : "opaque", "width" : "600", "height" : "300", "registerWithJS" : "1","dataSource" : "/umbraco/surface/ReportSurface/JsonQry?fctName=DisplayGraph01Json&fctArgs="}).render();</script>

<!-- END Script Block for Chart DisplayGraph01 -->

 

DEBUG:

 

Info: Chart loaded and initialized.

Initial Width: 600

Initial Height: 300

Scale Mode: noScale

Debug Mode: Yes

Application Message Language: EN

Version: 3.2.1

Chart Type: Single Series 3D Column Chart

Chart Objects:

BACKGROUND

CANVAS

CAPTION

SUBCAPTION

YAXISNAME

XAXISNAME

DIVLINES

YAXISVALUES

DATALABELS

DATAVALUES

TRENDLINES

TRENDVALUES

DATAPLOT

TOOLTIP

VLINES

VLINELABELS

 

INFO: Chart registered with external script. DOM Id of chart is DisplayGraph01

WARNING: Could not find dataXML or dataURL parameter. Setting dataURL to default data file Data.xml.

dataURL provided: Data.xml

dataURL invoked: Data.xml?FCTime=84

INFO: setDataXML method invoked from external script.

INFO: XML Data provided using dataXML method.

XML Data: <chart caption="Completed assessments" xaxisname="months" yaxisname="assessments" showvalues="0" formatnumberscale="0" showborder="1" logoURL="/FusionCharts/PT.gif" logoPosition="BL" logoAlpha="10"><set label="July" value="1" /><set label="September" value="1" /><set label="October" value="1" /><set label="November" value="1" /></chart>

Share this post


Link to post
Share on other sites

Hello,

 

I am using a licensed version of FusionCharts v3.2.1. I am embedding a chart with JSON data that I provide through the dataURL method. My problem is that often, the chart try to load the data.xml file (which obviously end in a 404 error) and after it load the data successfully from the url provided. The resulting chart works and display correctly, but browsers show an annoying error to the user because a resource failed to load.

 

Any idea of what I can do?

 

Thanks

 

 

EMBEDING CODE:

 

<!-- START Script Block for Chart DisplayGraph01 -->

<div id='DisplayGraph01Div' >

Chart.

</div>

<script type="text/javascript">

var chart_DisplayGraph01 = new FusionCharts({"dataFormat" : "jsonurl", "renderAt" : "DisplayGraph01Div", "debugMode" : "1", "swfUrl" : "/FusionCharts/Column3D.swf", "id" : "DisplayGraph01", "wMode" : "opaque", "width" : "600", "height" : "300", "registerWithJS" : "1","dataSource" : "/umbraco/surface/ReportSurface/JsonQry?fctName=DisplayGraph01Json&fctArgs="}).render();</script>

<!-- END Script Block for Chart DisplayGraph01 -->

 

DEBUG:

 

Info: Chart loaded and initialized.

Initial Width: 600

Initial Height: 300

Scale Mode: noScale

Debug Mode: Yes

Application Message Language: EN

Version: 3.2.1

Chart Type: Single Series 3D Column Chart

Chart Objects:

BACKGROUND

CANVAS

CAPTION

SUBCAPTION

YAXISNAME

XAXISNAME

DIVLINES

YAXISVALUES

DATALABELS

DATAVALUES

TRENDLINES

TRENDVALUES

DATAPLOT

TOOLTIP

VLINES

VLINELABELS

 

INFO: Chart registered with external script. DOM Id of chart is DisplayGraph01

WARNING: Could not find dataXML or dataURL parameter. Setting dataURL to default data file Data.xml.

dataURL provided: Data.xml

dataURL invoked: Data.xml?FCTime=84

INFO: setDataXML method invoked from external script.

INFO: XML Data provided using dataXML method.

XML Data: <chart caption="Completed assessments" xaxisname="months" yaxisname="assessments" showvalues="0" formatnumberscale="0" showborder="1" logoURL="/FusionCharts/PT.gif" logoPosition="BL" logoAlpha="10"><set label="July" value="1" /><set label="September" value="1" /><set label="October" value="1" /><set label="November" value="1" /></chart>

Hi,

 

Firstly I would like to tell you that you are using a much older version. Please upgrade to the latest version, i.e, FusionCharts v3.5.0. We do not support Flash any further.

 

Regarding the query, please note that "setDataURL" sets XML data URL on the chart. It is recommended to use the alternate function "setXMLUrl" or "setJSONUrl" (based on your data format you are providing).

 

"setDataURL" is a deprecated method since FusionCharts v3.2.0 hence, we recommend you to upgrade and use the latest functions instead.
 
For using JSON data to render the chart, please refer to the following link.
 
Hope this helps. :)

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