array_push($var, $variable->updated_at); array_push($s1, $var); array_push($var1, (int) $x); array_push($var1, (int) $variable->weight); array_push($var1, $variable->updated_at); array_push($s2, $var1); $x++; } include_once public_path() . "/phpChart_Lite/conf.php"; $pc = new C_PhpChartX(array($s1, $s2), 'basic_chart'); $pc->set_animate(true); $pc->set_title(array('text' => 'Patient Info')); $pc->add_plugins(array('highlighter', 'canvasTextRenderer')); $pc->add_plugins(array('cursor', 'pointLabels', 'barRenderer', 'categoryAxisRenderer'), true); $pc->set_axes(array('yaxis' => array('padMax' => 2.0))); $pc->set_grid(array('background' => 'lightyellow', 'borderWidth' => 0, 'borderColor' => '#000000', 'shadow' => true, 'shadowWidth' => 10, 'shadowOffset' => 3, 'shadowDepth' => 3, 'shadowColor' => 'rgba(230, 230, 230, 0.07)')); $pc->set_series_default(array('pointLabels' => array('show' => true, 'escapeHTML' => false, 'ypadding' => -15))); $pc->set_legend(array('show' => true)); $pc->add_series(array('label' => 'Blood Pressure')); $pc->add_series(array('label' => 'Weight')); $pc->draw(600, 400); $pc->draw(); ?> <a style="background-color: #4CAF50; /* Green */ border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block;
</head> <body> <div><span> </span><span id="info1b"></span></div> <?php $l1 = array(2, 3, 1, 4, 3); $l2 = array(1, 4, 3, 2, 5); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 1 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $pc = new C_PhpChartX(array($l1, $l2), 'chart'); $pc->set_title(array('text' => 'Stacked Filled Line Plot with Transparency (transparency not supported in IE6)')); $pc->set_stack_series(true); $pc->set_grid(array('background' => '#fefbf3', 'borderWidth' => 2.5)); $pc->set_animate(true); $pc->set_series_default(array('fill' => true, 'shadow' => false, 'showMarker' => false)); $pc->set_axes(array('xaxis' => array('pad' => 1.0, 'numberTicks' => 5), 'yaxis' => array('min' => 0, 'max' => 12, 'numberTicks' => 5))); $pc->add_series(array('color' => 'rgba(68, 124, 147, 0.7)')); $pc->add_series(array('color' => 'rgba(150, 35, 90, 0.7)')); $pc->draw(560, 400); /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 2 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $pc = new C_PhpChartX(array($l2),'chart2');
<?php require_once "../conf.php"; ?> <!DOCTYPE HTML> <html> <head> </head> <body> <div><span> </span><span id="info1b"></span></div> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 2 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $s2 = array(array(9, 3.5), array(15, 4.4), array(22, 6.0), array(38, 9.1), array(51, 12.0), array(62, 14.4)); $pc = new C_PhpChartX(array($s2), 'plot2'); $pc->add_plugins(array('canvasTextRenderer', 'canvasOverlay')); $grid = array('gridLineWidth' => 1.5, 'gridLineColor' => 'rgb(235,235,235)', 'drawGridlines' => true); $pc->set_grid($grid); $pc->set_canvas_overlay(array('show' => true, 'objects' => array(array('verticalLine' => array('name' => 'barney', 'x' => 10, 'lineWidth' => 6, 'color' => 'rgb(100, 55, 124)', 'shadow' => false)), array('verticalLine' => array('name' => 'fred', 'x' => 15, 'lineWidth' => 12, 'yminOffset' => '8px', 'ymaxOffset' => '29px', 'color' => 'rgb(50, 55, 30)', 'shadow' => false)), array('dashedVerticalLine' => array('name' => 'wilma', 'x' => 10, 'lineWidth' => 2, 'yOffset' => 14, 'color' => 'rgb(133, 120, 24)', 'shadow' => false)), array('verticalLine' => array('name' => 'pebbles', 'x' => 35, 'lineWidth' => 3, 'yOffset' => 0, 'lineCap' => 'butt', 'color' => 'rgb(89, 198, 154)', 'shadow' => false)), array('dashedVerticalLine' => array('name' => 'bam-bam', 'x' => 45, 'lineWidth' => 5, 'dashPattern' => array(16, 12), 'lineCap' => 'round', 'yOffset' => '20px', 'color' => 'rgb(66, 98, 144)', 'shadow' => false))))); $pc->draw(400, 300); ?> </body> </html>
<title>phpChart - Data Labels</title> </head> <body> <div><span> </span><span id="info1b"></span></div> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 1 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $s1 = array(array('Sony', 7), array('Samsumg', 13.3), array('LG', 14.7), array('Vizio', 5.2), array('Insignia', 1.2)); $pc = new C_PhpChartX(array($s1), 'chart1'); $pc->set_axes_default(array()); $pc->set_grid(array('drawBorder' => false, 'drawGridlines' => false, 'background' => '#ffffff', 'shadow' => false)); $pc->set_series_default(array('renderer' => 'plugin::PieRenderer', 'rendererOptions' => array('showDataLabels' => true, 'dataLabelPositionFactor' => 0.6, 'dataLabelNudge' => 0, 'dataLabels' => array('Longer', 'B', 'C', 'Longer', 'None')))); $pc->set_legend(array('show' => true, 'placement' => 'outside')); $pc->draw(300, 300); /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 2 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $s1 = array(array('Sony',7), array('Samsumg',13.3), array('LG',14.7), array('Vizio',5.2), array('Insignia', 1.2)); $pc = new C_PhpChartX(array($s1),'chart2'); $pc->set_axes_default(array()); $pc->set_series_default(array( 'renderer'=>'plugin::PieRenderer', 'rendererOptions'=>array(
<head> <style type="text/css" media="screen"> .jqplot-axis { font-size: 0.85em; } .jqplot-title { font-size: 1.1em; } </style> </head> <body> <div><span> </span><span id="info1b"></span></div> <?php $l1 = array(array(1, 2), array(4, 5), array(8, 9), array(15, 16), array(18, 40)); $l2 = array(array(2, 1), array(5, 4), array(12, 7), array(16, 12), array(19, 29)); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Chart 1 Example ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $pc = new C_PhpChartX(array($l1, $l2), 'chart'); $pc->set_animate(true); $pc->set_title(array('text' => 'Plot with Grid Customization')); $pc->set_axes(array('xaxis' => array('tickInterval' => 2, 'min' => 0), 'yaxis' => array('renderer' => 'plugin::LogAxisRenderer'))); $pc->set_grid(array('background' => 'rgba(0,0,0,0)', 'gridLineColor' => '#accf9b', 'borderWidth' => 2.5)); $pc->draw(360, 300); ?> </body> </html>