Sign in to follow this  
deva

fusion gantt chart integration

Recommended Posts

Guest Sashibhusan

Hi Deva,

 

Welcome to FusionCharts Forum.

 

It is very easy to integrate FusionCharts Gantt chart and other charts using FusionCharts PHP file "FusionCharts.php", which you would get from FusionCharts XT Download Pack > Code > PHP > Includes folder.

 

Please note that FusionCharts XT internally uses JavaScript and XML/JSON to render the charts. The PHP code of "FusionCharts.php" actually helps you output this JavaScript and XML/JSON to create the charts.

 

Please visit the below link of step by step tutorial of "Creating a simple Colimn2D chart using PHP and sample data from MySQL database."

Link: http://blog.fusioncharts.com/2012/03/javascript-charts-using-php-and-mysql-with-fusioncharts-xt-part-2/

 

Please go through the above mentioned blog tutorial once and follow the below steps to plot Gantt chart using PHP and MySQL.

 

a. First connect to your MySQL database using proper connection parameters. You may use FusionCharts "DBConn.php" or write your own PHP code to connect your application to the database.

 

b. Now create the XML data string by querying the required data from the database. Please note the XML data string should be as per the FusionWidgets XT Gantt chart data format.

 

Gantt Chart XML format:

<chart>
  <categories>
    <category start="02/01/2007" end="03/01/2007" label="Feb"/>
    ....
  </categories>
  <processes fontSize="12" isBold="1" align="right">
    <process label="Identify Customers"/>
    ....
  </processes>
  <tasks>
    <task start="02/04/2007" end="02/10/2007"/>
    .....
  </tasks>
</chart>

c. Now create the chart using "renderChart()" function by providing the required parameters to this function.

 

For more details information on "Plotting data from a database" from our online documentation, please visit the link: http://docs.fusioncharts.com/charts/contents/?guide-for-web-developers/php/PHP_DB.html

 

In case if you will face any difficulty while creating Gantt chart using PHP and MySQL, please do let us know.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this