Hello community,
Is there a way to fill the chart with raw sql DB data through the PHP connector?
Or do I have to present a grid first and display the data from that?
I couldn’t find a guide to connecting chart with php connector.
Hello community,
Is there a way to fill the chart with raw sql DB data through the PHP connector?
Or do I have to present a grid first and display the data from that?
I couldn’t find a guide to connecting chart with php connector.
Hello
You can use the same connector as for DataView. There are samples in coonector folder:
dhtmlxConnector_php/samples/dataview/
You can download connector here:
dhtmlx.com/docs/products/dhtmlxConnector/
I was able to correctly display the data for the dataview connector sample. However, is there any guide for how I would add a chart based on this dataview-connection?
Any help much appreciated! Cheers!
I don’t think there is any guide or documentation out there so allow me to elaborate:
Connect your chart with a data.load(‘connector.php’)
and in that file:
write your usual DB connection information
include the chart_connector.php from the php connector bundle
And just the same as grids use the following code:
$graph = new ChartConnector($conn,'MySQL');
$conn->render_table('tablename','ID','columns, you_want_to, include');
Cheers.
The documentation describes connector initialization in general:
docs.dhtmlx.com/connector__php__ … serverside
Here is the information about initialization for different components, including Chart :
docs.dhtmlx.com/connector__php__ … onenttypes