chilly Report post Posted November 10, 2017 (edited) Im getting an error of TypeError: B.register is not a function at /Test/node_modules/fusioncharts/fusioncharts.charts.js:6:125 I am using fusioncharts installed via npm and have reverted to your guide on rendering charts via npm. Following step by step the error comes when trying to include require("fusioncharts/fusioncharts.charts")(FusionCharts); Performing a search in the fusioncharts.charts.js file shows me there is a B.register function inside. Is the guide wrong and missing a step, or is this a bug. I can display the chart using HTML fine, the js implementation is having hiccups Edited November 10, 2017 by chilly Share this post Link to post Share on other sites
Ayan Bhadury Report post Posted November 11, 2017 Hi, Could you give us few more details, about which FusionChart's javascript plugin you are using, so that we could assist you further. Share this post Link to post Share on other sites
chilly Report post Posted November 11, 2017 (edited) This error was without using a plugin, after trying the jquery plugin im receiving Function.register isnt a function. other libraries are rendering just fine, fusion however, refuses. Edited November 11, 2017 by chilly Share this post Link to post Share on other sites
Vishal Chhabria Report post Posted November 12, 2017 (edited) On 11/11/2017 at 3:02 AM, chilly said: Im getting an error of TypeError: B.register is not a function at /Test/node_modules/fusioncharts/fusioncharts.charts.js:6:125 I am using fusioncharts installed via npm and have reverted to your guide on rendering charts via npm. Following step by step the error comes when trying to include require("fusioncharts/fusioncharts.charts")(FusionCharts); Performing a search in the fusioncharts.charts.js file shows me there is a B.register function inside. Is the guide wrong and missing a step, or is this a bug. I can display the chart using HTML fine, the js implementation is having hiccups Have you been able to fix this ? I am facing this issue as well. Edited November 12, 2017 by Vishal Chhabria Share this post Link to post Share on other sites
Ayan Bhadury Report post Posted November 13, 2017 @chilly : Please share us a scale down sample replicating your problem, so that we could assist you further. @Vishal Chhabria : Kindly refer our sample which was shared with you via this ticket id: 520468 Share this post Link to post Share on other sites
chilly Report post Posted November 14, 2017 My problem was explained clear and concise to start with. Please re-read it so I can assist you further. Side Note: I will instead move away from fusion. Nice charts, terrible support. Problem was explained clearly, I stated exactly where the error was occurring, and the exact steps I followed from FusionCharts own tutorial on rendering charts using npm, including a link to the steps. Im not building a sample project for you to have a week long confused conversation about why your product isnt functioning as intended and hear you say its working on your end. Every other library is functioning properly. Have a good day. Share this post Link to post Share on other sites
Gagan Sikri Report post Posted November 15, 2017 Hey @chilly, Apologies for inconvenience. Since, files installed from NPM are minified version of FusionCharts and it will be very difficult for us to debug the issue that you are facing. It will be great if you could provide us with exact steps or scaled down sample so that we can replicate the issue and debug it further using source map. Share this post Link to post Share on other sites
chilly Report post Posted November 17, 2017 Maybe my english isn't very good? My OP stated the exact steps and included a link. My Second reply added clarification as requested. My third reply stated clearly that I have explained best I could. Lets try more ways. I can also provide pictures or cartoon drawings if needed. (Marker or Crayon, your choice ) Link to the steps - https://www.fusioncharts.com/dev/getting-started/installing-via-npm-and-bower/installing-via-npm.html Steps copied and pasted from the link above incase your mouse is broken: Installing the fusioncharts Package Step 1: Install the FusionCharts package. npm install fusioncharts Step 2: Load FusionCharts using require. var FusionCharts = require("fusioncharts"); Step 3: Load the charts module using require. require("fusioncharts/fusioncharts.charts")(FusionCharts); Step 4: Create the FusionCharts instance required to render the chart. var chart = new FusionCharts ({ "type": "column2d", "width": "500", "height": "300", "dataFormat": "json", "dataSource": { chart:{}, data: [{value: 500}, {value: 600}, {value: 700}] } }).render("chartContainer"); Share this post Link to post Share on other sites
chilly Report post Posted November 17, 2017 Runkit - https://runkit.com/chillywilly187/fusionchart.fail Share this post Link to post Share on other sites
Gagan Sikri Report post Posted November 24, 2017 Hey @chilly FusionCharts is not completely ES6 compatible as of now so you have to use webpack bundler to render the charts. We have created a sample for you reference. Please follow the below steps to run the same: - Extract zip file and navigate to fc-demo folder via terminal/command line. - use below command to install all the dependencies. npm install - use command to bundle the package (webpack is used for bundling - you can check bundle config in package.json) npm run bundle - Run index.html file. We have reported this issue internally and team is working on ES6 compatibility. fc-demo.zip Share this post Link to post Share on other sites
Vishal Chhabria Report post Posted November 26, 2017 (edited) On 11/24/2017 at 8:32 PM, Gagan Sikri said: Hey @chilly FusionCharts is not completely ES6 compatible as of now so you have to use webpack bundler to render the charts. We have created a sample for you reference. Please follow the below steps to run the same: - Extract zip file and navigate to fc-demo folder via terminal/command line. - use below command to install all the dependencies. npm install - use command to bundle the package (webpack is used for bundling - you can check bundle config in package.json) npm run bundle - Run index.html file. We have reported this issue internally and team is working on ES6 compatibility. fc-demo.zip Till when should we expect FusionCharts to be compatible with ES6 ? Edited November 26, 2017 by Vishal Chhabria Share this post Link to post Share on other sites