Category: How do I do X?


This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Custom Chart - Multiseries Line 2D (msline) - Fusion Chart Format?


I am having trouble getting any output on my custom graph using Fusion Chart's multi-series format. My dataset is coming in from an SQL source and includes user access counts by date and user. I have written the JavaScript code to map the data, but despite formatting it to the Fusion Chart's docs, I am still not seeing the desired output on my graph. The error message box shows my code producing a format that seems correct, but it does not match the expected format. I later found that datasource must be camelcase, and the data values may need to be strings, so changing row.count to row.count.toString() made it work.


The user has a data-set coming in from an SQL source and wants to create a custom graph using Fusion Chart library with date on the x-axis and count on the y-axis for each user as a series. They have written a code in the multi-series format as per Fusion's docs, but they are not getting any output on their graph. The initial code seems to produce a format similar to Fusion's docs, but it does not line up with their expected format.

Upon analysis, the issue turned out to be that the "datasource" object needs to be in camel case, and the data values must be strings. So, the user updated their code by changing "datasource" to "dataSource" and "row.count" to "row.count.toString()" to convert the values to strings.

After implementing these changes, their code started to work, and they were able to get the desired output on their custom graph.