ft needs a json, you must write a file from php type json
$result = json_encode($dataIngGast, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE |JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT);
$arquivo = "column-line-combination-data-gasto-ingreso-finanzas.json";
$fp = fopen($arquivo, "a+");
I am a beginner at all things coding but need some help with Fusion Charts if anyone can help.
I have followed along with tutorials already for Fusion Charts linking it to MySQL database and displaying a chart with no issues.
However, I would like to display a time-series chart, which uses FusionTime. This requires the data to be in a Datatable. ” FusionTime accepts data in rows and columns as a Datatable”.
I cannot find any examples online for taking SQL data and converting into a datatable with data and schema which it seems to require. This is different from the way fusioncharts works.
My SQL database contains many tables and many columns within it, so will need to select the appropriate column to display.
I would appreciate any advice anyone can provide. The main problem is I don’t know how to get the SQL database into a data and schema file to display with fusiontime. This is to display on a webpage hosted locally.
Many thanks for any time you can provide to help with this
Could you provide a few more details, like the table structure, what the schema should look like, any code you’ve written, etc.?
FusionTime takes data in an Array of array format. No matter what your database is, you need to generate the data in an array of array format. Mostly all the UI libraries follows the same standard. Write a script that can generate your sql data to the expected format in a file.
Thanks for your reply Chris. Here is a link to the tutorial to create a time-series using the data and schema:
Thank you Dip686. I will try and research how to do this