예제 #1
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/chart_data.php';
require_once '../include/header.php';
$gauge = new \Kendo\Dataviz\UI\LinearGauge('gauge');
$gauge->pointer(array('value' => 65, 'shape' => 'arrow'))->scale(array('majorUnit' => 20, 'minorUnit' => 5, 'max' => 180, 'ranges' => array(array('from' => 80, 'to' => 120, 'color' => '#ffc700'), array('from' => 120, 'to' => 150, 'color' => '#ff7a00'), array('from' => 150, 'to' => 180, 'color' => '#c20000'))));
echo $gauge->render();
?>
<div class="configuration k-widget k-header" style="width:170px;">
    <span class="configHead">Configuration</span>
    <span class="configTitle">Gauge scale should...</span>
    <ul class="options">
        <li>
            <input id="vertical" checked="checked" type="checkbox" autocomplete="off">
            <label for="vertical">... be vertical</label>
        </li>

        <li>
            <input id="labels" checked="checked" type="checkbox" autocomplete="off">
            <label for="labels">... show labels</label>
        </li>

        <li>
            <input id="ranges" checked="checked" type="checkbox" autocomplete="off">
            <label for="ranges">... show ranges</label>
        </li>
    </ul>
</div>
<script>
$(document).ready(function() {
예제 #2
0
파일: index.php 프로젝트: neevan1e/Done
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/chart_data.php';
require_once '../include/header.php';
$gauge = new \Kendo\Dataviz\UI\LinearGauge('gauge');
$gauge->pointer(array('value' => 28))->scale(array('majorUnit' => 20, 'minorUnit' => 2, 'min' => -40, 'max' => 60, 'vertical' => true, 'ranges' => array(array('from' => -40, 'to' => -20, 'color' => '#2798df'), array('from' => 30, 'to' => 45, 'color' => '#ffc700'), array('from' => 45, 'to' => 60, 'color' => '#c20000'))));
echo $gauge->render();
require_once '../include/footer.php';