O'Reilly logo

FusionCharts by Shamasis Bhattacharya, Pallav Nadhani, Sanket Nadhani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — creating a chart using data from array

  1. In the root of your web application, create a folder named Includes if you do not already have it, and copy the FusionCharts PHP Library FusionCharts.php and DBConn.php files from FusionCharts download package | Code | PHP | Includes.
  2. Create a PHP file named chart_from_array.php in the root of your application.
  3. Type the following code in it:
    <?php include("/Includes/FusionCharts.php"); ?> <html> <head> <title>FusionCharts - Plotting data from an array</title> <script src="Charts/FusionCharts.js"></script> </head> <body> <?php $productArray = array(); $productArray['2009']['Sales of Food Products'] = 892500; $productArray['2010']['Sales of Food Products'] = 1407400; $productArray['2011']['Sales ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required