Kendo Gauge
by alexandrejunges
HTML
<script src="http://cdn.kendostatic.com/2012.1.229/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.dataviz.min.css">
<!-- class="k-content" -->
<div class="fixedClass">
<div class="relativeClass">
<div id="gauge"></div>
</div>
</div>
CSS
.fixedClass {
width: 386px;
height: 386px;
}
.relativeClass {
width: 100%;
height: 100%;
}
#gauge {
width: 100%;
height: 100%;
}
JavaScript
$(function() {
$("#gauge").kendoGauge({
pointer: {
value: 75
},
scale: {
minorUnit: 1,
max: 100,
ranges: [{
from: 0,
to: 40,
color: "gray"
}, {
from: 40,
to: 80,
color: "#aeaeae"
}, {
from: 80,
to: 100,
color: "#cecece"
}]
}
});
});