The jqChart...
<?php
require_once '../../../tabs.php';
?>
<!DOCTYPE html>
<html>
<head>
<style type="text">
html, body {
margin: 0; /* Remove body margin/padding */
padding: 0;
overflow: hidden; /* Remove scroll bars on browser window */
font-size: 62.5%;
}
body {
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
}
#tags {z-index: 900}
</style>
<title>jqChart PHP Demo</title>
<link rel="stylesheet" type="text/css" media="screen" href="../../../themes/redmond/jquery-ui-1.8.2.custom.css" />
<script src="../../../js/jquery.js" type="text/javascript"></script>
<script src="../../../js/jquery.jqChart.min.js" type="text/javascript"></script>
<script src="../../../js/jquery-ui-custom.min.js" type="text/javascript"></script>
</head>
<body>
<div>
<?php include ("chart.php");?>
</div>
<br/>
<?php tabs(array("chart.php"));?>
</body>
</html>
chart.php.
<?php
require_once '../../../jq-config.php';
require_once ABSPATH."php/jqUtils.php";
require_once ABSPATH."php/jqChart.php";
$chart = new jqChart();
$chart->setChartOptions(array(
"defaultSeriesType"=>"area",
"spacingBottom"=>30
))
->setTitle(array('text'=>'Fruit consumption *'))
->setSubtitle(array(
"text"=>'* Jane\'s banana consumption is unknown',
"floating"=> true,
"align"=>"right",
"verticalAlign"=> 'bottom',
"y"=>15
))
->setLegend(array(
"layout"=> 'vertical',
"align"=> 'left',
"verticalAlign"=> 'top',
"x"=> 150,
"y"=> 100,
"floating"=> true,
"borderWidth"=> 1,
"backgroundColor"=> '#FFFFFF'
))
->setxAxis(array(
"categories"=> array('Apples', 'Pears', 'Oranges', 'Bananas', 'Grapes', 'Plums', 'Strawberries', 'Raspberries')
))
->setyAxis(array(
"title"=>array("text"=> 'Y-Axis'),
"labels"=>array("formatter"=>"js:function(){return this.value;}")
))
->setTooltip(array(
"formatter"=>"function(){return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y;}"
))
->setPlotOptions(array(
"area"=>array(
"fillOpacity"=> 0.5
)
))
->addSeries('Jhon', array(0, 1, 4, 4, 5, 2, 3, 7))
->addSeries('Jane', array(1, 0, 3, null, 3, 1, 2, 1));
echo $chart->renderChart('', true, 700, 350);
?>