AdrianNidz

Read JSON file to chart possible?

Recommended Posts

Hello,

is there possibility to read the datas in the following way? More precisly can i read datas from file? I tried do that with file data.json but with no result, help ! :)

<div id="chart"></div>

<%
    FusionCharts lineChart = new FusionCharts(
            // type of chart
            "line",
            // unique chart ID
            "myFirstChart",
            // width and height of the chart
            "500","300",
            // div ID of the chart container
            "chart",
            // data format
            "xml",
            "data.json");
%>

<!--    Step 5: Render the chart    -->
<%=lineChart.render()%>

Share this post


Link to post
Share on other sites

Hi,

Yes you could read from the external data source all you need to do is set the data format as jsonurl if it is a JSON file and xmlurl if it is an xml file, then on the next parameter pass the file name with its extension

To know more in details check this link - https://www.fusioncharts.com/dev/getting-started/setting-data-source-using-url.html

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