bugle-reports
Version:
Simple reporting API for CrateDB
62 lines (44 loc) • 1.5 kB
HTML
<link rel="import" href="./bower_components/polymer/polymer.html" />
<link rel="import" href="./webcomponents/bugl-donut-chart/bugl-donut-chart.html" />
<dom-module id="bugl-sleep-chart">
<template>
<div>
<bugl-donut-chart id="sleep" title="{{title}}" url="{{url}}" max-value="{{goal}}" on-data="onData" color="{{color}}" remainder-color="{{remainderColor}}"></bugl-donut-chart>
</div>
</template>
<style>
</style>
<script>
/*global Polymer*/
Polymer({
is: "bugl-sleep-chart",
properties: {
title: {
type: String,
value: "Sleep"
},
color: {
type: String,
value: "gray"
},
remainderColor: {
type: String,
value: "silver"
},
url: {
type: String,
value: ""
},
goal: {
type: Number,
value: 8
}
},
ready: function() {
},
onData: function(e, data) {
e.target.setResult(data + " hours");
}
});
</script>
</dom-module>