Using fusion charts from php

Good day
Fusioncharts are a part of SC, great, however,
how to call them from php directly? the examples on fusionchart start from

include("includes/fusioncharts.php");

has anyone used them from PHP code (initiating, configuring etc)?

Hi Maxim,

Is this something you can do with:

1 Like

thanx, that is something!
however, there is code at step 6 : ```
sc_include_lib (“fusioncharts”);

this was exactly my point, there is no single word about this library, where does it come from? if i just test this include in PHP, it gives some error, and the page is not loading.

Look here it’a a sample that include fusionchart to show a gantt chart.

1 Like

thanks man,
so it is added as a javascript lib sc_include_lib(“fusioncharts”);

can we actually use fusioncharts in PHP mode directly? there should be fusioncharts php library somewhere.

I haven’t found the PHP version of that library, maybe Netmake can only distribute the js version.

1 Like

indeed, there is no php lib, it is just a wrapper on fusioncharts site.

1 Like

Hi Vincenzo,
i noticed you use some custom PHP functions to convert indexed array to json.
could you share your best practice , how to do it in efficient way?

Very easy, I just wrote a function that read from database tasks, filling an associative array in PHP, with all data the graph needs, and then with

var fasidate = <?php echo json_encode( $tasks , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) ?>;

convert the php array in a json output that is good for javascript.