예제 #1
0
            <td class="direct">
<?php 
    $valueAxis = new \Kendo\Dataviz\UI\SparklineValueAxisItem();
    $valueAxis->max(50);
    $sparkline = new \Kendo\Dataviz\UI\Sparkline("bar-direct-{$i}");
    $sparkline->type('bar')->renderAs('canvas')->data($row['direct'])->addValueAxisItem($valueAxis)->attr('style', 'width: 130px');
    echo $sparkline->render();
    ?>
            </td>
            <td class="benefits">
<?php 
    $dataSource = new \Kendo\Data\DataSource();
    $dataSource->data($row['benefits'])->addGroupItem(array('field' => 'type'));
    $series = new \Kendo\Dataviz\UI\SparklineSeriesItem();
    $series->type('bar')->field('value');
    $valueAxis = new \Kendo\Dataviz\UI\SparklineValueAxisItem();
    $valueAxis->max(10);
    $sparkline = new \Kendo\Dataviz\UI\Sparkline("bar-benefits-{$i}");
    $sparkline->renderAs('canvas')->dataSource($dataSource)->addSeriesItem($series)->addValueAxisItem($valueAxis)->attr('style', 'width: 130px');
    echo $sparkline->render();
    ?>
            </td>
        </tr>
<?php 
}
?>
        </tbody>
    </table>
</div>

<style scoped>
예제 #2
0
파일: index.php 프로젝트: neevan1e/Done
            </tr>
        </table>
    </div>
    <div class="temperature">
        <h1>
            Temperature control
        </h1>
        <div class="stats">
<?php 
$lowRange = new \Kendo\Dataviz\UI\SparklineValueAxisItemPlotBand();
$lowRange->from(0)->to(15)->color("#787878")->opacity(0.15);
$medRange = new \Kendo\Dataviz\UI\SparklineValueAxisItemPlotBand();
$medRange->from(15)->to(22)->color("#787878")->opacity(0.3);
$hiRange = new \Kendo\Dataviz\UI\SparklineValueAxisItemPlotBand();
$hiRange->from(22)->to(30)->color("#787878")->opacity(0.15);
$tempRangeAxis = new \Kendo\Dataviz\UI\SparklineValueAxisItem();
$tempRangeAxis->min(0)->max(30)->addPlotBand($lowRange)->addPlotBand($medRange)->addPlotBand($hiRange);
$tempRange = new \Kendo\Dataviz\UI\Sparkline('temp-range');
$tempRange->type('bullet')->data(array(21, 23))->addValueAxisItem($tempRangeAxis);
echo $tempRange->render();
?>
        </div>
    </div>
    <div class="conditioner">
        <h1>
            Conditioner working time
        </h1>
        <ul class="pie-list stats">
            <li>MON
<?php 
$statsMon = new \Kendo\Dataviz\UI\Sparkline('stats-mon');