<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/chart_data.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: application/json'); $result = chart_budget_report(); echo json_encode($result); exit; } require_once '../include/header.php'; $budget = new \Kendo\Dataviz\UI\ChartSeriesItem(); $budget->field('budget'); $spending = new \Kendo\Dataviz\UI\ChartSeriesItem(); $spending->field('spending'); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('unit'); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('template' => '$#= value / 1000 #k')); $transport = new \Kendo\Data\DataSourceTransport(); $transport->read(array('url' => 'remote-data-binding.php', 'type' => 'POST', 'dataType' => 'json')); $dataSource = new \Kendo\Data\DataSource(); $dataSource->transport($transport); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Budget report'))->dataSource($dataSource)->addSeriesItem($budget, $spending)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'radarLine', 'style' => 'smooth')); echo $chart->render(); require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/chart_data.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: application/json'); $result = chart_stock_prices(); echo json_encode($result); exit; } require_once '../include/header.php'; $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->type('line')->field('close')->name('#= group.value # (close)'); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => '${0}', 'skip' => 2, 'step' => 2)); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('date')->labels(array('format' => 'MMM')); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('{0}%')->template('#= series.name # - #= value #%'); $model = new \Kendo\Data\DataSourceSchemaModel(); $model->addField(array('field' => 'date', 'type' => 'date')); $schema = new \Kendo\Data\DataSourceSchema(); $schema->model($model); $transport = new \Kendo\Data\DataSourceTransport(); $transport->read(array('url' => 'grouped-data.php', 'type' => 'POST', 'dataType' => 'json')); $dataSource = new \Kendo\Data\DataSource(); $dataSource->transport($transport)->schema($schema)->addGroupItem(array('field' => 'symbol'))->addSortItem(array('field' => 'date', 'dir' => 'asc')); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Stock Prices'))->dataSource($dataSource)->legend(array('position' => 'bottom'))->addSeriesItem($series)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'area'))->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/chart_data.php'; require_once '../include/header.php'; $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->field('value')->name('United States'); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => '{0}%'))->line(array('visible' => false)); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('year')->majorGridLines(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('{0}%')->template('#= category # - #= value #%'); $dataSource = new \Kendo\Data\DataSource(); $dataSource->data(chart_united_states_internet_usage()); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Internet Users in United States'))->dataSource($dataSource)->legend(array('visible' => false))->addSeriesItem($series)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'area', 'labels' => array('visible' => true, 'format' => '{0}%', 'background' => 'transparent')))->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $india = new \Kendo\Dataviz\UI\ChartSeriesItem(); $india->name('India')->data(array(3.907, 7.943, 7.848, 9.284000000000001, 9.263, 9.801, 3.89, 8.238, 9.552, 6.855)); $world = new \Kendo\Dataviz\UI\ChartSeriesItem(); $world->name('World')->data(array(1.988, 2.733, 3.994, 3.464, 4.001, 3.939, 1.333, -2.245, 4.339, 2.727)); $russia = new \Kendo\Dataviz\UI\ChartSeriesItem(); $russia->name('World')->data(array(4.743, 7.295, 7.175, 6.376, 8.153, 8.535, 5.247, -7.832, 4.3, 4.3)); $haiti = new \Kendo\Dataviz\UI\ChartSeriesItem(); $haiti->name('Haiti')->data(array(-0.253, 0.362, -3.519, 1.799, 2.252, 3.343, 0.843, 2.877, -5.416, 5.59)); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => '{0}%'))->line(array('visible' => false))->axisCrossingValue(-10); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->categories(array(2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011))->majorGridLines(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('{0}%')->template('#= series.name #: #= value #'); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Gross domestic product growth /GDP annual %/'))->legend(array('position' => 'bottom'))->addSeriesItem($india, $world, $russia, $haiti)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->tooltip($tooltip)->chartArea(array('background' => 'transparent'))->seriesDefaults(array('type' => 'line', 'style' => 'smooth')); echo $chart->render(); ?> <style type="text/css"> #chart { background: center no-repeat url('../content/shared/styles/world-map.png'); } </style> <?php require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/chart_data.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: application/json'); $result = chart_spain_electricity_production(); echo json_encode($result); exit; } require_once '../include/header.php'; $nuclear = new \Kendo\Dataviz\UI\ChartSeriesItem(); $nuclear->field('nuclear')->name('Nuclear'); $hydro = new \Kendo\Dataviz\UI\ChartSeriesItem(); $hydro->field('hydro')->name('Hydro'); $wind = new \Kendo\Dataviz\UI\ChartSeriesItem(); $wind->field('wind')->name('Wind'); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => 'N0'))->line(array('visible' => false))->majorUnit(10000); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('year')->labels(array('rotation' => -90))->crosshair(array('visible' => true)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('N0')->shared(true); $transport = new \Kendo\Data\DataSourceTransport(); $transport->read(array('url' => 'remote-data-binding.php', 'type' => 'POST', 'dataType' => 'json')); $dataSource = new \Kendo\Data\DataSource(); $dataSource->transport($transport)->addSortItem(array('field' => 'year', 'dir' => 'asc')); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Spain electricity production (GWh)'))->dataSource($dataSource)->legend(array('position' => 'top'))->addSeriesItem($nuclear, $hydro, $wind)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'line'))->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/chart_data.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: application/json'); $result = chart_spain_electricity_production(); echo json_encode($result); exit; } require_once '../include/header.php'; $nuclear = new \Kendo\Dataviz\UI\ChartSeriesItem(); $nuclear->field('nuclear')->name('Nuclear'); $hydro = new \Kendo\Dataviz\UI\ChartSeriesItem(); $hydro->field('hydro')->name('Hydro'); $wind = new \Kendo\Dataviz\UI\ChartSeriesItem(); $wind->field('wind')->name('Wind'); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => 'N0'))->majorUnit(10000); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('year')->labels(array('rotation' => -90))->crosshair(array('visible' => true)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('N0')->shared(true); $transport = new \Kendo\Data\DataSourceTransport(); $transport->read(array('url' => 'remote-data-binding.php', 'type' => 'POST', 'dataType' => 'json')); $dataSource = new \Kendo\Data\DataSource(); $dataSource->transport($transport)->addSortItem(array('field' => 'year', 'dir' => 'asc')); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Spain electricity production (GWh)'))->dataSource($dataSource)->legend(array('position' => 'top'))->addSeriesItem($nuclear, $hydro, $wind)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'area'))->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';
$female2039 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $female2039->name('20-39')->stack('Female')->data(array(490550, 555695, 627763, 718568, 810169, 883051, 942151, 1001395, 1058439)); $female4064 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $female4064->name('40-64')->stack('Female')->data(array(379788, 411217, 447201, 484739, 395533, 435485, 499861, 569114, 655066)); $female6579 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $female6579->name('65-79')->stack('Female')->data(array(97894, 113287, 128808, 137459, 152171, 170262, 191015, 210767, 226956)); $female80 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $female80->name('80+')->stack('Female')->data(array(16358, 18576, 24586, 30352, 36724, 42939, 46413, 54984, 66029)); $male019 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $male019->name('0-19')->stack('Male')->data(array(900268, 972205, 1031421, 1094547, 1155600, 1202766, 1244870, 1263637, 1268165)); $male2039 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $male2039->name('20-39')->stack('Male')->data(array(509133, 579487, 655494, 749511, 844496, 916479, 973694, 1036548, 1099507)); $male4064 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $male4064->name('40-64')->stack('Male')->data(array(364179, 401396, 440844, 479798, 390590, 430666, 495030, 564169, 646563)); $male6579 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $male6579->name('65-79')->stack('Male')->data(array(74208, 86516, 98956, 107352, 120614, 138868, 158387, 177078, 192156)); $male80 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $male80->name('80+')->stack('Male')->data(array(9187, 10752, 13007, 15983, 19442, 23020, 25868, 31462, 39223)); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('template' => "#= kendo.format('{0:N0}', value / 1000) # M"))->line(array('visible' => false)); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->categories(array(1970, 1975, 1980, 1985, 1990, 1995, 2000, 2005, 2010))->majorGridLines(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->template('#= series.stack #s, age #= series.name #'); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'World population by age group and sex'))->legend(array('visible' => false))->addSeriesItem($female019, $female2039, $female4064, $female6579, $female80, $male019, $male2039, $male4064, $male6579, $male80)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->tooltip($tooltip)->seriesColors(array('#cd1533', '#d43851', '#dc5c71', '#e47f8f', '#eba1ad', '#009bd7', '#26aadd', '#4db9e3', '#73c8e9', '#99d7ef'))->seriesDefaults(array('type' => 'column')); echo $chart->render(); ?> <?php require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/chart_data.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: application/json'); $result = chart_spain_electricity_production(); echo json_encode($result); exit; } require_once '../include/header.php'; $nuclear = new \Kendo\Dataviz\UI\ChartSeriesItem(); $nuclear->field('nuclear')->name('Nuclear'); $hydro = new \Kendo\Dataviz\UI\ChartSeriesItem(); $hydro->field('hydro')->name('Hydro'); $wind = new \Kendo\Dataviz\UI\ChartSeriesItem(); $wind->field('wind')->name('Wind'); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => 'N0'))->line(array('visible' => false))->minorGridLines(array('visible' => true))->type('log'); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('year')->labels(array('rotation' => -90))->crosshair(array('visible' => true)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('N0')->shared(true); $transport = new \Kendo\Data\DataSourceTransport(); $transport->read(array('url' => 'remote-data-binding.php', 'type' => 'POST', 'dataType' => 'json')); $dataSource = new \Kendo\Data\DataSource(); $dataSource->transport($transport)->addSortItem(array('field' => 'year', 'dir' => 'asc')); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Spain electricity production (GWh)'))->dataSource($dataSource)->legend(array('position' => 'top'))->addSeriesItem($nuclear, $hydro, $wind)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'line'))->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';
require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $india = new \Kendo\Dataviz\UI\ChartSeriesItem(); $india->name('India')->data(array(3.907, 7.943, 7.848, 9.284000000000001, 9.263, 9.801, 3.89, 8.238, 9.552, 6.855)); $russia = new \Kendo\Dataviz\UI\ChartSeriesItem(); $russia->name('Russian Federation')->data(array(4.743, 7.295, 7.175, 6.376, 8.153, 8.535, 5.247, -7.832, 4.3, 4.3)); $germany = new \Kendo\Dataviz\UI\ChartSeriesItem(); $germany->name('Germany')->data(array(0.01, -0.375, 1.161, 0.6840000000000001, 3.7, 3.269, 1.083, -5.127, 3.69, 2.995)); $world = new \Kendo\Dataviz\UI\ChartSeriesItem(); $world->name('World')->data(array(1.988, 2.733, 3.994, 3.464, 4.001, 3.939, 1.333, -2.245, 4.339, 2.727)); $cateogrySeriesAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $cateogrySeriesAxis->name("series-axis")->line(array('visible' => false)); $categoryLabelsAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryLabelsAxis->name("series-labels")->categories(array(2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011)); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => '{0}%'))->line(array('visible' => false))->axisCrossingValue(array(0, -PHP_INT_MAX)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('{0}%')->template('#= series.name #: #= value #'); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Gross domestic product growth /GDP annual %/'))->legend(array('position' => 'top'))->addSeriesItem($india, $russia, $germany, $world)->addValueAxisItem($valueAxis)->addCategoryAxisItem($cateogrySeriesAxis)->addCategoryAxisItem($categoryLabelsAxis)->tooltip($tooltip)->chartArea(array('background' => 'transparent'))->seriesDefaults(array('type' => 'column')); echo $chart->render(); ?> <style type="text/css"> #chart { background: center no-repeat url('../content/shared/styles/world-map.png'); } </style> <?php require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/header.php'; $mv2007 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $mv2007->name('Market value as of 2007')->data(array(116, 165, 215, 75, 100, 49, 80, 116, 108, 90, 67, 76, 91, 255, 120)); $mv2009 = new \Kendo\Dataviz\UI\ChartSeriesItem(); $mv2009->name('Market value as of 2009')->data(array(64, 85, 97, 27, 16, 26, 35, 32, 26, 17, 10, 7, 19, 5)); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->categories(array("Santander", "JP Morgan", "HSBC", "Credit Suisse", "Goldman Sachs", "Morgan Stanley", "Societe Generale", "UBS", "BNP Paribas", "Unicredit", "Credit Agricole", "Deutsche Bank", "Barclays", "Citigroup", "RBS")); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => '${0}')); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('${0} bln'); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Market Value of Major Banks'))->legend(array('position' => 'bottom'))->seriesDefaults(array('type' => 'radarLine', 'style' => 'smooth'))->addSeriesItem($mv2007, $mv2009)->addCategoryAxisItem($categoryAxis)->addValueAxisItem($valueAxis)->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';
<?php require_once '../lib/Kendo/Autoload.php'; require_once '../include/chart_data.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: application/json'); $result = chart_stock_prices(); echo json_encode($result); exit; } require_once '../include/header.php'; $series = new \Kendo\Dataviz\UI\ChartSeriesItem(); $series->type('area')->field('close')->name('#= group.value # (close)'); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => 'N0', 'skip' => 2, 'step' => 2))->line(array('visible' => false))->max(700); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('date')->labels(array('format' => 'MMM'))->line(array('visible' => false))->majorGridLines(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('{0}%')->template('#= series.name # - #= value #%'); $model = new \Kendo\Data\DataSourceSchemaModel(); $model->addField(array('field' => 'date', 'type' => 'date')); $schema = new \Kendo\Data\DataSourceSchema(); $schema->model($model); $transport = new \Kendo\Data\DataSourceTransport(); $transport->read(array('url' => 'grouped-data.php', 'type' => 'POST', 'dataType' => 'json')); $dataSource = new \Kendo\Data\DataSource(); $dataSource->transport($transport)->schema($schema)->addGroupItem(array('field' => 'symbol'))->addSortItem(array('field' => 'date', 'dir' => 'asc')); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Stock Prices'))->dataSource($dataSource)->legend(array('position' => 'bottom'))->addSeriesItem($series)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'area'))->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: application/json'); $result = chart_spain_electricity_production(); echo json_encode($result); exit; } require_once '../include/header.php'; $nuclear = new \Kendo\Dataviz\UI\ChartSeriesItem(); $nuclear->field('nuclear')->name('Nuclear'); $hydro = new \Kendo\Dataviz\UI\ChartSeriesItem(); $hydro->field('hydro')->name('Hydro'); $wind = new \Kendo\Dataviz\UI\ChartSeriesItem(); $wind->field('wind')->name('Wind'); $plotband1 = new \Kendo\Dataviz\UI\ChartXAxisItemPlotBand(); $plotband1->from(10000)->to(30000)->color('#c00')->opacity(0.3); $plotband2 = new \Kendo\Dataviz\UI\ChartYAxisItemPlotBand(); $plotband2->from(30000)->to(30500)->color('#c00')->opacity(0.8); $valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem(); $valueAxis->labels(array('format' => 'N0'))->addPlotBand($plotband1, $plotband2)->max(70000)->majorUnit(10000)->line(array('visible' => false)); $categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem(); $categoryAxis->field('year')->majorGridLines(array('visible' => false)); $tooltip = new \Kendo\Dataviz\UI\ChartTooltip(); $tooltip->visible(true)->format('N0'); $transport = new \Kendo\Data\DataSourceTransport(); $transport->read(array('url' => 'remote-data-binding.php', 'type' => 'POST', 'dataType' => 'json')); $dataSource = new \Kendo\Data\DataSource(); $dataSource->transport($transport)->addSortItem(array('field' => 'year', 'dir' => 'asc')); $chart = new \Kendo\Dataviz\UI\Chart('chart'); $chart->title(array('text' => 'Spain electricity production (GWh)'))->dataSource($dataSource)->addSeriesItem($nuclear, $hydro, $wind)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->seriesDefaults(array('type' => 'column'))->tooltip($tooltip); echo $chart->render(); require_once '../include/footer.php';