Steve Workings

Cannot get javascript charts to work

Recommended Posts

I've been using Fusioncharts for years. Cannot get a single javascript chart to work and I have 100's to upgrade.

 

What's wrong here?

 

When I try below, I get Console errors in Chrome:

 
FusionCharts.register is not a function
FusionCharts.ready is not a function
 
Here's the pertinent code, clipped right out of your documentation (and yes, let's not waste yet another cycle of exchanges asking me if those javascript files are present -- do not insult me).

<script type="text/javascript" src="fusionCharts.js"></script>
<script type="text/javascript" src="fusionCharts.charts.js"></script>
<script type="text/javascript" src="fusionCharts.widgets.js"></script>

<script type="text/javascript">
FusionCharts.ready(function () {
    var myChart = new FusionCharts({
      "type": "column2d",
      "renderAt": "chartContainer",
      "width": "500",
      "height": "300",
      "dataFormat": "xml",
      "dataSource": "<chart caption='Harrys SuperMart' subcaption='Monthly revenue for last year' xaxisname='Month' yaxisname='Amount' numberprefix='$' palettecolors='#008ee4' bgalpha='0' borderalpha='20' canvasborderalpha='0' useplotgradientcolor='0' plotborderalpha='10' placevaluesinside='1' rotatevalues='1' valuefontcolor='#ffffff' captionpadding='20' showaxislines='1' axislinealpha='25' divlinealpha='10'><set label='Jan' value='420000' /><set label='Feb' value='810000' /><set label='Mar' value='720000' /><set label='Apr' value='550000' /><set label='May' value='910000' /><set label='Jun' value='510000' /><set label='Jul' value='680000' /><set label='Aug' value='620000' /><set label='Sep' value='610000' /><set label='Oct' value='490000' /><set label='Nov' value='900000' /><set label='Dec' value='730000' /></chart>"
    });

  myChart.render();
});
</script>
</head>
<body>

<div id="chartContainer">FusionCharts whatever will load here!</div>
<div id="chart-container">JSON chart here </div>

</body>

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