} </style> </head> <body> <div><span> </span><span id="info1b"></span></div> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 1 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $line1 = array(array('<frogs> & lizards', 3), array('buzzards & gizzards', 7), array('deer & beef', 2.5), array('turkeys & vulures', 6), array('moles & voles', 5), array('ground hogs & beets', 4)); $line2 = array(3, 7, 2.5, 6, 5, 4); $pc = new C_PhpChartX(array($line1), 'chart1'); $pc->set_series_color(array('#dd3333', '#d465f1', '#aa2211', '#3377aa', '#6699bb', '#9933aa')); $pc->set_title(array('text' => 'Default Pie Chart with Custom Colors')); $pc->set_series_default(array('renderer' => 'plugin::PieRenderer')); $pc->draw(400, 300); /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 2 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $line1 = array(array('<frogs> & lizards', 3), array('buzzards & gizzards', 7), array('deer & beef', 2.5), array('turkeys & vulures', 6), array('moles & voles', 5), array('ground hogs & beets', 4)); $line2 = array(3, 7, 2.5, 6, 5, 4); $pc = new C_PhpChartX(array($line1),'chart2');
<button onclick="plot1.moveSeriesToFront(0);">Lions</button> <button onclick="plot1.moveSeriesToFront(1);">Tigers</button> <button onclick="plot1.moveSeriesToFront(2);">Bears</button> <button onclick="plot1.restorePreviousSeriesOrder();">Last Order</button> <button onclick="plot1.restoreOriginalSeriesOrder();">Original Order</button> <?php $l1 = array(3, 4, 1, 4, 2); $l2 = array(2, 5, 1, 4, 2); $l3 = array(1, 6, 1, 4, 2); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 1 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $pc = new C_PhpChartX(array($l1, $l2, $l3), 'plot1'); $pc->add_plugins(array('highlighter', 'enhancedLegendRenderer'), true); $pc->set_legend(array('show' => true, 'renderer' => 'plugin::EnhancedLegendRenderer')); $pc->set_animate(true); $pc->set_series_default(array('lineWidth' => 4)); $pc->add_series(array('label' => 'lions')); $pc->add_series(array('label' => 'tigers')); $pc->add_series(array('label' => 'bears')); $pc->set_series_color(array('#cc6666', '#66cc66', '#6666cc')); $pc->set_highlighter(array('bringSeriesToFront' => true)); $pc->draw(600, 400); ?> </body> </html>