<?php $l1 = array(18, 36, 14, 11); $l2 = array(array(2, 14), array(7, 2), array(8, 5)); $l3 = array(4, 7, 9, 2, 11, 5, 9, 13, 8, 7); $l4 = array(array('peech', 3), array('cabbage', 2), array('bean', 4), array('orange', 5)); $catOHLC = array(array(1, 138.7, 139.68, 135.18, 135.4), array(2, 143.46, 144.66, 139.79, 140.02), array(3, 140.67, 143.56, 132.88, 142.44), array(4, 136.01, 139.5, 134.53, 139.48), array(5, 143.82, 144.56, 136.04, 136.97), array(6, 136.47, 146.4, 136, 144.67), array(7, 124.76, 135.9, 124.55, 135.81), array(8, 123.73, 129.31, 121.57, 122.5)); $ticks = array('Tue', 'Wed', 'Thu', 'Fri', 'Mon', 'Tue', 'Wed', 'Thr'); $options = array('title' => 'I was hidden', 'lengend' => array('show' => true), 'series' => array(array(), array('yaxis' => 'y2axis'), array('yaxis' => 'y3axis')), 'cursor' => array('show' => true, 'zoom' => true), 'axesDefaults' => array('useSeriesColor' => true)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 1 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $pc = new C_PhpChartX(array($l1, $l2, $l3), 'plot1'); $pc->add_plugins(array('cursor', 'ohlcRenderer')); $pc->set_properties($options); $pc->draw(680, 260); /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 2 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $pc = new C_PhpChartX(array($l4),'plot2'); $pc->add_plugins(array('cursor','ohlcRenderer')); $pc->add_series(array('renderer'=>'plugin::PieRenderer')); $pc->set_legend(array('show'=>true)); $pc->draw(300,200); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
</style> </head> <body> <div><span> </span><span id="info1b"></span></div> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 1 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $plotoptions = array('gridPadding' => array('top' => 1), 'grid' => array('shadow' => false, 'borderWidth' => 1.0), 'seriesDefaults' => array('yaxis' => 'y2axis'), 'axes' => array('xaxis' => array('renderer' => 'plugin::DateAxisRenderer', 'tickOptions' => array('formatString' => '%b %d')), 'yaxis' => array('y2axis' => array('tickOptions' => array('formatString' => '%.4f')))), 'series' => array(array('showMarker' => false)), 'noDataIndicator' => array('show' => true, 'indicator' => '<img src="ajax-loader.gif" /><br />Loading Data...', 'axes' => array('xaxis' => array('min' => 0, 'max' => 5, 'tickInterval' => 1, 'showTicks' => false), 'yaxis' => array('show' => false), 'y2axis' => array('show' => true, 'min' => 0, 'max' => 8, 'tickInterval' => 2, 'showTicks' => false))), 'canvasOverlay' => array('show' => true, 'objects' => array(array('dashedHorizontalLine' => array('name' => 'current', 'y' => 6, 'lineWidth' => 1.5, 'color' => 'rgb(60, 60, 60)', 'yaxis' => 'y2axis', 'shadow' => false, 'dashPattern' => array(12, 12)))))); $pc = new C_PhpChartX(array(), 'plot1'); $pc->add_plugins(array('canvasOverlay')); $pc->set_properties($plotoptions); $pc->draw(800, 400); echo '<div id="pricePointer" style="display:none;"></div> <button id="start">Start</button> <button id="stop">Stop</button>'; ?> <script type="text/javascript" lang="javascript"> var data = [['2011-04-05 16:00', 1332.63], ['2011-04-04 16:00', 1332.87], ['2011-04-01 16:00', 1332.41], ['2011-03-31 16:00', 1325.83], ['2011-03-30 16:00', 1328.26], ['2011-03-29 16:00', 1319.44], ['2011-03-28 16:00', 1310.19], ['2011-03-25 16:00', 1313.8],