1
I have a php app that displays a bar chart from the a database.
Here is the code for it...
require_once('/var/www/html/qap/testapp/Connections/TestDirector.php'); ?>
include_once('/var/www/html/qap/testapp/includes/MXCharts/mx_charts.inc.php'); ?>
mysql_select_db($database_TestDirector, $TestDirector);
$query_Recordset1 = "SELECT TEST.TS_STATUS, Count(TEST.TS_SUBJECT) AS CountOfTS_SUBJECT, TEST.TS_RESPONSIBLE FROM TEST GROUP BY TEST.TS_STATUS, TEST.TS_RESPONSIBLE";
$Recordset1 = mysql_query($query_Recordset1, $TestDirector) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$Chart_1 = new MX_Chart();
$Chart_1->setRelativePath("../../testapp/");
$Chart_1->setChartType("Bar", 500, 300);
$Chart_1->setDataRange($Recordset1, "TS_RESPONSIBLE", "CountOfTS_SUBJECT", "Normal", "");
$Chart_1->setSort("None", "ASC");
$Chart_1->setChartTitle("Test Case Writing");
?>
echo $Chart_1->getImage();
?>
mysql_free_result($Recordset1);
?>
Now, the chart shows up if you just load the php page alone, but it will not show up if you take the code and place it in a block..
All the blocj has in it (When I do a source on the preview) is
<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><meta http-equiv="content-language" content="en" /><title>e-Secureity ::: QA Portal :::title><link rel="stylesheet" type="text/css" media="all" href="http://172.16.0.101/qap/themes/GrayMeetsPurple/style.css" />head><body><table><tr><th>1234th>tr><tr><td>td>tr>table>body>html>
Anyone have a tought on a solution for this... thanks..