<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $data = array(1, 1); for ($i = 2; $i < 39; $i++) { $data[] = $data[$i - 1] + $data[$i - 2]; } $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->data($data); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->type('log')->minorGridLines(array('visible' => true)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->addSeriesItem($series)->addValueAxisItem($valueAxis)->title(array('text' => 'Fibonacci sequence'))->tooltip($tooltip); echo $chart->render(); ?> <?php require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $polar1 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $polar1->data(array(array(0, 0), array(15, 2), array(30, 4), array(45, 6), array(60, 8), array(75, 10), array(90, 12), array(105, 14), array(120, 16), array(135, 18), array(150, 20), array(165, 22), array(180, 24), array(195, 26), array(210, 28), array(225, 30), array(240, 32), array(255, 34), array(270, 36), array(285, 38), array(300, 40), array(315, 42), array(330, 44), array(345, 46), array(360, 48), array(15, 50), array(30, 52), array(45, 54), array(60, 56), array(75, 58), array(90, 60))); $polar2 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $polar2->data(array(array(0, 0), array(15, 1), array(30, 2), array(45, 3), array(60, 4), array(75, 5), array(90, 6), array(105, 7), array(120, 8), array(135, 9), array(150, 10), array(165, 11), array(180, 12), array(195, 13), array(210, 14), array(225, 15), array(240, 16), array(255, 17), array(270, 18), array(285, 19), array(300, 20), array(315, 21), array(330, 22), array(345, 23), array(360, 24), array(15, 25), array(30, 26), array(45, 27), array(60, 28), array(75, 29), array(90, 30))); $polar3 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $polar3->data(array(array(0, 0), array(15, 3), array(30, 6), array(45, 9), array(60, 12), array(75, 15), array(90, 18), array(105, 21), array(120, 24), array(135, 27), array(150, 30), array(165, 33), array(180, 36), array(195, 39), array(210, 42), array(225, 45), array(240, 48), array(255, 51), array(270, 54), array(285, 57), array(300, 60), array(315, 63), array(330, 66), array(345, 69), array(360, 72), array(15, 75), array(30, 78), array(45, 81), array(60, 84), array(75, 87), array(90, 90))); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Polar plot'))->addSeriesItem($polar1, $polar2, $polar3)->seriesDefaults(array('type' => 'polarLine', 'style' => 'smooth')); echo $chart->render(); require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $ft3 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $ft3->data(array(array(150, 3), array(150, 3.1), array(152, 3.2), array(152, 3.1), array(151, 3.2), array(153, 3.3), array(149, 3))); $ft7 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $ft7->data(array(array(270, 5), array(250, 7), array(259, 4), array(270, 7), array(265, 5), array(250, 7), array(263, 8), array(261, 5))); $yAxis = new \Kendo\Dataviz\UI\ChartYAxisItem(); $yAxis->visible(false)->max(10); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Buck spread'))->legend(array('position' => 'bottom'))->seriesDefaults(array('type' => 'polarScatter'))->addSeriesItem($ft3, $ft7)->addYAxisItem($yAxis); echo $chart->render(); require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $seriesDefault = array('type' => 'funnel', 'dynamicHeight' => false, 'dynamicSlope' => false, 'labels' => array('visible' => true, 'background' => 'transparent', 'color' => 'white', 'format' => 'N0')); $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->data(array(array('category' => 'Impressions', 'value' => 434823, 'color' => '#0e5a72'), array('category' => 'Clicks', 'value' => 356854, 'color' => '#166f99'), array('category' => 'Unique Visitors', 'value' => 280022, 'color' => '#2185b4'), array('category' => 'Downloads', 'value' => 190374, 'color' => '#319fd2'), array('category' => 'Purchases', 'value' => 120392, 'color' => '#3eaee2'))); $chart_oct = new \Kendo\Dataviz\UI\Chart('chart-oct'); $chart_oct->title(array('position' => 'bottom', 'text' => 'October'))->addSeriesItem($series)->seriesDefaults($seriesDefault)->legend(array('visible' => false))->tooltip(array('visible' => true, 'template' => '#=dataItem.category#')); $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->data(array(array('category' => 'Impressions', 'value' => 984528, 'color' => '#0e5a72'), array('category' => 'Clicks', 'value' => 856287, 'color' => '#166f99'), array('category' => 'Unique Visitors', 'value' => 643694, 'color' => '#2185b4'), array('category' => 'Downloads', 'value' => 567843, 'color' => '#319fd2'), array('category' => 'Purchases', 'value' => 389137, 'color' => '#3eaee2'))); $chart_nov = new \Kendo\Dataviz\UI\Chart('chart-nov'); $chart_nov->title(array('position' => 'bottom', 'text' => 'November'))->seriesDefaults($seriesDefault)->addSeriesItem($series)->legend(array('visible' => false))->tooltip(array('visible' => true, 'template' => '#=dataItem.category#')); $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->data(array(array('category' => 'Impressions', 'value' => 1200528, 'color' => '#0e5a72'), array('category' => 'Clicks', 'value' => 989287, 'color' => '#166f99'), array('category' => 'Unique Visitors', 'value' => 885694, 'color' => '#2185b4'), array('category' => 'Downloads', 'value' => 788843, 'color' => '#319fd2'), array('category' => 'Purchases', 'value' => 694137, 'color' => '#3eaee2'))); $chart_dec = new \Kendo\Dataviz\UI\Chart('chart-dec'); $chart_dec->title(array('position' => 'bottom', 'text' => 'December'))->seriesDefaults($seriesDefault)->addSeriesItem($series)->legend(array('visible' => false))->tooltip(array('visible' => true, 'template' => '#=dataItem.category#')); ?> <div class="chart-wrapper"> <h2>Sales statistics</h2> <?php echo $chart_oct->render(); ?> <?php echo $chart_nov->render(); ?> <?php echo $chart_dec->render(); ?> </div> <div class="configuration-horizontal">
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $errorBars = new \Kendo\Dataviz\UI\ChartSeriesItemErrorBars(); $errorBars->value('stderr'); $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->data(array(4.743, 7.295, 7.175, 6.376, 8.153, 8.535, 5.247, -7.832, 4.3, 4.3))->errorBars($errorBars); $labelsPadding = new \Kendo\Dataviz\UI\ChartCategoryAxisItemLabelsPadding(); $labelsPadding->top(175); $categoryAxisLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemLabels(); $categoryAxisLabels->padding($labelsPadding); $cateogrySeriesAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $cateogrySeriesAxis->line(array('visible' => false))->categories(array(2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011))->labels($categoryAxisLabels); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => '{0}%'))->line(array('visible' => false))->axisCrossingValue(0); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('{0}%'); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Gross domestic product growth and standard error'))->legend(array('visible' => false))->addSeriesItem($series)->addValueAxisItem($valueAxis)->addCategoryAxisItem($cateogrySeriesAxis)->tooltip($tooltip)->seriesDefaults(array('type' => 'column')); echo $chart->render(); ?> <?php require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $errorBars = new \Kendo\Dataviz\UI\ChartSeriesItemErrorBars(); $errorBars->value('stddev'); $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->data(array(7.943, 7.848, 9.284000000000001, 9.263, 9.801, 3.89, 8.238, 9.552))->errorBars($errorBars); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => '{0}%'))->line(array('visible' => false))->axisCrossingValue(0); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->categories(array(2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010))->line(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('{0}%')->template('#= value # (σ = #= kendo.toString(high - low, "N2") #)'); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'GDP growth and standard deviation'))->legend(array('visible' => false))->addSeriesItem($series)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->tooltip($tooltip)->seriesDefaults(array('type' => 'area')); echo $chart->render(); require_once '../include/footer.php';
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->majorGridLines(array('visible' => false))->majorTicks(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->shared(true)->template('Maximum: #= value.target # <br /> Average: #= value.current #'); $chart_hum = new \Kendo\Dataviz\UI\Chart('chart-hum'); $chart_hum->addSeriesItem($hum)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->legend(array('visible' => false))->chartArea(array('margin' => array('left' => 0)))->seriesDefaults(array('type' => 'bullet'))->tooltip($tooltip); echo $chart_hum->render(); ?> </td> </tr> <tr> <td class="item">temp</td> <td class="chart"> <?php $temp = new \Kendo\Dataviz\UI\ChartSeriesItem(); $temp->data(array(array(25, 22))); $plotband1 = new \Kendo\Dataviz\UI\ChartXAxisItemPlotBand(); $plotband1->from(0)->to(10)->color('yellow')->opacity(0.3); $plotband2 = new \Kendo\Dataviz\UI\ChartXAxisItemPlotBand(); $plotband2->from(10)->to(20)->color('orange')->opacity(0.3); $plotband3 = new \Kendo\Dataviz\UI\ChartXAxisItemPlotBand(); $plotband3->from(20)->to(30)->color('red')->opacity(0.3); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->min(0)->max(30)->majorGridLines(array('visible' => false))->majorTicks(array('visible' => false))->addPlotBand($plotband1, $plotband2, $plotband3); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->majorGridLines(array('visible' => false))->majorTicks(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->shared(true)->template('Maximum: #= value.target # <br /> Average: #= value.current #'); $chart_temp = new \Kendo\Dataviz\UI\Chart('chart-temp'); $chart_temp->addSeriesItem($temp)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->legend(array('visible' => false))->chartArea(array('margin' => array('left' => 0)))->seriesDefaults(array('type' => 'bullet'))->tooltip($tooltip); echo $chart_temp->render();