Closed watery closed 3 years ago
Hi, I'm giving a quick try at adding a graph to an existing React application which already successfully shows bar charts and angular charts (gauges).
I keep getting
Uncaught SyntaxError: expected expression, got '<'
and
The script from “http://localhost:3000/fleet-management/machine/fusioncharts.powercharts.js” has been loaded although its MIME type (“text/html”) isn't a valid JavaScript MIME type
in the browser console.
I copied the example code from here https://www.fusioncharts.com/charts/drag-node-charts/simple-graph-layout?framework=react and added to the webapp source. I didn't change any dependency. Am I missing something perhaps?
Nevermind, I was missing these lines:
import Powercharts from 'fusioncharts/fusioncharts.powercharts'; Powercharts(FusionCharts);
Now the graph shows up correctly.
Hi, I'm giving a quick try at adding a graph to an existing React application which already successfully shows bar charts and angular charts (gauges).
I keep getting
and
in the browser console.
I copied the example code from here https://www.fusioncharts.com/charts/drag-node-charts/simple-graph-layout?framework=react and added to the webapp source. I didn't change any dependency. Am I missing something perhaps?