Ejemplo n.º 1
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$gold = new \Kendo\Dataviz\UI\ChartSeriesItem();
$gold->name('Gold Medals')->data(array(40, 32, 34, 36, 45, 33, 34, 83, 36, 37, 44, 37, 35, 36, 46))->color('#f3ac32');
$silver = new \Kendo\Dataviz\UI\ChartSeriesItem();
$silver->name('Silver Medals')->data(array(19, 25, 21, 26, 28, 31, 35, 60, 31, 34, 32, 24, 40, 38, 29))->color('#b8b8b8');
$bronze = new \Kendo\Dataviz\UI\ChartSeriesItem();
$bronze->name('Bronze Medals')->data(array(17, 17, 16, 28, 34, 30, 25, 30, 27, 37, 25, 33, 26, 36, 29))->color('#bb6e36');
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array(1952, 1956, 1960, 1964, 1968, 1972, 1976, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012))->select(array('from' => 2, 'to' => 5))->majorGridLines(array('visible' => false));
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->title(array('text' => 'Olympic Medals won by USA'))->legend(array('visible' => false))->addSeriesItem($gold, $silver, $bronze)->addCategoryAxisItem($categoryAxis)->selectStart('onSelectStart')->select('onSelect')->selectEnd('onSelectEnd');
echo $chart->render();
?>
<div class="configuration-horizontal">
    <span class="configHead">Mousewheel</span>
    <div class="config-section">
        <ul class="options">
            <li>
                <input id="reverse" type="checkbox" />
                <label for="reverse">Reverse</label>
            </li>
        </ul>
    </div>
    <div class="config-section">
        <ul class="options">
            <li>
                <label for="zoom">Zoom direction</label>
                <select id="zoom">
Ejemplo n.º 2
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$total = new \Kendo\Dataviz\UI\ChartSeriesItem();
$total->name('Total Visits')->data(array(56000, 63000, 74000, 91000, 117000, 138000));
$unique = new \Kendo\Dataviz\UI\ChartSeriesItem();
$unique->name('Unique visitors')->data(array(52000, 34000, 23000, 48000, 67000, 83000));
$valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$valueAxis->line(array('visible' => false));
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'))->majorGridLines(array('visible' => false));
$tooltip = new \Kendo\Dataviz\UI\ChartTooltip();
$tooltip->visible(true)->template('#= series.name #: #= value #');
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->addSeriesItem($total, $unique)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->legend(array('position' => 'bottom'))->seriesDefaults(array('type' => 'column'))->chartArea(array('background' => 'transparent'))->title(array('text' => 'Site Visitors Stats /thousands/'))->tooltip($tooltip);
echo $chart->render();
?>
<div class="configuration-horizontal">
    <div class="config-section">
        <span class="configHead">Gap</span>
        <ul class="options">
            <li>
                <input id="gap" type="number" value="1.5" step="0.1" style="width: 60px;" />
                <button id="getGap" class="k-button">Set gap</button
            </li>
        </ul>
    </div>
    <div class="config-section">
        <span class="configHead">Spacing</span>
        <ul class="options">
Ejemplo n.º 3
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$maxTemperature = new \Kendo\Dataviz\UI\ChartSeriesItem();
$maxTemperature->type('line')->data(array(6, 10, 10, 10, 10, 9, 5, 5, 10, 8, 8, 5, 8, 11, 9, 15, 20, 23, 24, 21, 21, 20, 22, 22, 20, 18, 16, 15, 20, 13.2, 18))->name('Max. Temperature [&deg;C]')->color('#ff1c1c')->axis('temp');
$minTemperature = new \Kendo\Dataviz\UI\ChartSeriesItem();
$minTemperature->type('line')->data(array(-5, -6, 0, -4, -3, -5.2, -5, -1.7, -1, 0, -0.4, -2, -2, -5, 4, -2, -4, -1, -1, 2, 4, -1, 1, 1, 4, 0, -1, 1, -2, 5.7, 5))->name('Min. Temperature [&deg;C]')->color('#ffae00')->axis('temp');
$windSpeed = new \Kendo\Dataviz\UI\ChartSeriesItem();
$windSpeed->type('area')->data(array(16.4, 21.7, 35.4, 19, 10.9, 13.6, 10.9, 10.9, 10.9, 16.4, 16.4, 13.6, 13.6, 29.9, 27.1, 16.4, 13.6, 10.9, 16.4, 10.9, 24.5, 10.9, 8.1, 19, 21.7, 27.1, 24.5, 16.4, 27.1, 29.9, 27.1))->name('Wind Speed [km/h]')->color('#73c100')->axis('wind');
$rainfall = new \Kendo\Dataviz\UI\ChartSeriesItem();
$rainfall->type('area')->data(array(5.4, 2, 5.4, 3, 2, 1, 3.2, 7.4, 0, 8.199999999999999, 0, 1.8, 0.3, 0, 0, 2.3, 0, 3.7, 5.2, 6.5, 0, 7.1, 0, 4.7, 0, 1.8, 0, 0, 0, 1.5, 0.8))->name('Rainfall [mm]')->color('#007eff')->axis('rain');
$rainValueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$rainValueAxis->name('rain')->color('#007eff')->min(0)->max(60);
$windValueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$windValueAxis->name('wind')->color('#73c100')->min(0)->max(60);
$tempValueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$tempValueAxis->name('temp')->min(-30)->max(30);
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'))->axisCrossingValue(array(32, 32, 0))->justified(true);
$tooltip = new \Kendo\Dataviz\UI\ChartTooltip();
$tooltip->visible(true)->format('{0}')->template('#= category #/03: #= value #');
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->title(array('text' => 'March Weather Report'))->legend(array('position' => 'bottom'))->addSeriesItem($maxTemperature, $minTemperature, $windSpeed, $rainfall)->addValueAxisItem($rainValueAxis, $windValueAxis, $tempValueAxis)->addCategoryAxisItem($categoryAxis)->tooltip($tooltip)->seriesDefaults(array('type' => 'line'));
echo $chart->render();
require_once '../include/footer.php';
Ejemplo n.º 4
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$battery = new \Kendo\Dataviz\UI\ChartSeriesItem();
$battery->type('column')->data(array(20, 40, 45, 30, 50))->stack(true)->name('on battery')->color('#cc6e38');
$gas = new \Kendo\Dataviz\UI\ChartSeriesItem();
$gas->type('column')->data(array(20, 30, 35, 35, 40))->stack(true)->name('on gas')->color('#ef955f');
$mpg = new \Kendo\Dataviz\UI\ChartSeriesItem();
$mpg->type('line')->data(array(30, 38, 40, 32, 42))->name('mpg')->color('#ec5e0a')->axis('mpg');
$l100km = new \Kendo\Dataviz\UI\ChartSeriesItem();
$l100km->type('line')->data(array(7.8, 6.2, 5.9, 7.4, 5.6))->name('l/100 km')->color('#4e4141')->axis('l100km');
$milesAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$milesAxis->title(array('text' => 'miles'))->min(0)->max(100);
$kmAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$kmAxis->name('km')->title(array('text' => 'km'))->min(0)->max(161)->majorUnit(32);
$mpgAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$mpgAxis->name('mpg')->title(array('text' => 'miles per gallo'))->color('#642381');
$l100kmAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$l100kmAxis->name('l100km')->title(array('text' => 'liters per 100km'))->color('#e5388a');
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array('Mon', 'Tue', 'Wed', 'Thu', 'Fri'))->axisCrossingValue(array(0, 0, 10, 10));
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->title(array('text' => 'Hybrid car mileage report'))->legend(array('position' => 'top'))->addSeriesItem($battery, $gas, $mpg, $l100km)->addValueAxisItem($milesAxis, $kmAxis, $mpgAxis, $l100kmAxis)->addCategoryAxisItem($categoryAxis);
echo $chart->render();
require_once '../include/footer.php';
Ejemplo n.º 5
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$andrew = new \Kendo\Dataviz\UI\ChartSeriesItem();
$andrew->name('Andrew Dodsworth')->data(array(10, 3, 3, 10, 2, 10));
$margaret = new \Kendo\Dataviz\UI\ChartSeriesItem();
$margaret->name('Margaret Peacock')->data(array(9, 7, 7, 9, 6, 7));
$nancy = new \Kendo\Dataviz\UI\ChartSeriesItem();
$nancy->name('Nancy Callahan')->data(array(4, 10, 10, 5, 5, 4));
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array("Experience", "Communication", "Friendliness", "Subject knowledge", "Presentation", "Education"))->majorGridLines(array('visible' => false));
$valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$valueAxis->labels(array('format' => '{0}%'))->line(array('visible' => false));
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->title(array('text' => 'Employment candidate review'))->legend(array('position' => 'bottom'))->seriesDefaults(array('type' => 'radarArea'))->addSeriesItem($andrew, $margaret, $nancy)->addCategoryAxisItem($categoryAxis)->addValueAxisItem($valueAxis);
echo $chart->render();
require_once '../include/footer.php';
Ejemplo n.º 6
0
$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';
Ejemplo n.º 7
0
<?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';
Ejemplo n.º 8
0
<?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';
Ejemplo n.º 9
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$nutrients = new \Kendo\Dataviz\UI\ChartSeriesItem();
$nutrients->name('Nutrients')->type('radarColumn')->data(array(5, 1, 1, 5, 0, 1, 1, 2, 1, 2, 1, 0, 0, 2, 1, 0, 3, 1, 1, 1, 0, 0, 0));
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array("Df", "Pr", "A", "C", "D", "E", "Th", "Ri", "Ni", "B", "F", "B", "Se", "Mn", "Cu", "Zn", "K", "P", "Fe", "Ca", "Na", "Ch", "Sf"));
$valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$valueAxis->visible(false);
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->title(array('text' => 'Nutrient balance: Apples, raw'))->legend(array('visible' => false))->addSeriesItem($nutrients)->addCategoryAxisItem($categoryAxis)->addValueAxisItem($valueAxis);
echo $chart->render();
require_once '../include/footer.php';
Ejemplo n.º 10
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$series = new \Kendo\Dataviz\UI\ChartSeriesItem();
$series->type('boxPlot')->data(array(array('lower' => 26.2, 'q1' => 38.3, 'median' => 51.0, 'q3' => 61.45, 'upper' => 68.90000000000001, 'mean' => 49.0, 'outliers' => array(18.3, 20, 70, 72, 5)), array('lower' => 26.4, 'q1' => 38.125, 'median' => 46.8, 'q3' => 60.425, 'upper' => 66.8, 'mean' => 47.3, 'outliers' => array(18, 69, 71.3, 71.5)), array('lower' => 31.6, 'q1' => 41.725, 'median' => 52.35, 'q3' => 62.175, 'upper' => 70.8, 'mean' => 52.3, 'outliers' => array(14, 16.4, 74)), array('lower' => 34.4, 'q1' => 39.375, 'median' => 49.9, 'q3' => 61.425, 'upper' => 69.2, 'mean' => 50.3, 'outliers' => array(16, 18, 72, 72.5)), array('lower' => 29.9, 'q1' => 38.35, 'median' => 50.4, 'q3' => 60.875, 'upper' => 69.7, 'mean' => 49.9, 'outliers' => array(19, 20, 76, 78)), array('lower' => 22.3, 'q1' => 36.875, 'median' => 48.9, 'q3' => 62.65, 'upper' => 70.3, 'mean' => 49.0, 'outliers' => array(16.5, 17, 74, 75, 78)), array('lower' => 32.3, 'q1' => 39.5, 'median' => 54.1, 'q3' => 61.175, 'upper' => 67.3, 'mean' => 50.8, 'outliers' => array(13, 14, 15, 74.3, 75.2, 76)), array('lower' => 28.5, 'q1' => 36.075, 'median' => 50.5, 'q3' => 64.2, 'upper' => 70.40000000000001, 'mean' => 49.6, 'outliers' => array(18, 22, 73.40000000000001, 75)), array('lower' => 33.6, 'q1' => 40.65, 'median' => 49.55, 'q3' => 62.8, 'upper' => 69.2, 'mean' => 51.1, 'outliers' => array(17, 73)), array('lower' => 33.6, 'q1' => 38.6, 'median' => 47.9, 'q3' => 60.825, 'upper' => 67.0, 'mean' => 49.7, 'outliers' => array(12, 13.5, 16, 73, 74.59999999999999, 77)), array('lower' => 31.9, 'q1' => 36.425, 'median' => 49.3, 'q3' => 61.825, 'upper' => 69.7, 'mean' => 49.4, 'outliers' => array(17, 76)), array('lower' => 34.0, 'q1' => 41.225, 'median' => 51.15, 'q3' => 62.4, 'upper' => 68.8, 'mean' => 51.6, 'outliers' => array(14.6, 17.3, 72.3, 74))));
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))->majorGridLines(array('visible' => false));
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->title(array('text' => 'Monthly Mean Temperatures (&deg;F)'))->legend(array('visible' => false))->addSeriesItem($series)->addCategoryAxisItem($categoryAxis);
echo $chart->render();
require_once '../include/footer.php';
Ejemplo n.º 11
0
<?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));
$valueAxis = new \Kendo\Dataviz\UI\ChartValueAxisItem();
$valueAxis->labels(array('format' => '{0}%'))->line(array('visible' => false))->axisCrossingValue(0);
$labelsPadding = new \Kendo\Dataviz\UI\ChartCategoryAxisItemLabelsPadding();
$labelsPadding->top(80);
$categoryAxisLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemLabels();
$categoryAxisLabels->padding($labelsPadding);
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->categories(array(2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011))->line(array('visible' => false))->labels($categoryAxisLabels);
$tooltip = new \Kendo\Dataviz\UI\ChartTooltip();
$tooltip->visible(true)->format('{0}%')->template('#= series.name #: #= value #');
$errorBars = new \Kendo\Dataviz\UI\ChartSeriesItemErrorBars();
$errorBars->value('percentage(20)');
$chart = new \Kendo\Dataviz\UI\Chart('chart');
$chart->title(array('text' => 'Gross domestic product growth and percentage error'))->legend(array('visible' => false))->addSeriesItem($india, $world)->addValueAxisItem($valueAxis)->addCategoryAxisItem($categoryAxis)->tooltip($tooltip)->seriesDefaults(array('type' => 'line', 'errorBars' => $errorBars));
echo $chart->render();
require_once '../include/footer.php';
Ejemplo n.º 12
0
<?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';