Data for Chart is retrieved from Joomlas MySql DatabaseNotes:
We will not only access Joomla's local database but retrieve similar data from remote MySql Datenbases. All sites have flashChart installed and are using flashChart's MySql interface.
Here you have this PHP-Script - "getDatafromDB.php", which has been installed in directory "../templates/system" on both remote sites:
<?php defined('_JEXEC') or die('Restricted access'); require_once (JPATH_ROOT . "/plugins/content/flashchart/lib/flashchart_class.php"); $chartdata = new flashChart("myid"); $chartdata->setChartProperty("data", "database"); $chartdata->setChartProperty("sql", "Select title, hits From jos_content Order By hits Desc Limit 10"); echo ( $chartdata->getChartProperty("data") ); ?>
Important: If you want to test this sample via copy/paste, ensure that you paste with option "paste as plain text" otherwise imbedded html-codes may invalidate your input.