I have a data with multiple customers, each customer has a "percent tank is full" data point. I would like to put this info in a grid and have the "percent tank full" displayed visually with the radial gauge rather than just a numeric value. How would I go about doing this?
1 Answer, 1 is accepted
0
T. Tsonev
Telerik team
answered on 27 Mar 2014, 09:05 AM
Hello,
My suggestion is to create a column template that will host the gauge: <script id="gaugeTemplate" type="x/kendo-template">
<div class="gauge" style="height: 40px;"></div>
</script>
... columns: [{ ... }, {
title: "%",
template: $("#gaugeTemplate").html(),
width: "60px"
}]
We can instantiate it during the dataBound event: function onDataBound(e) {
var data = e.sender.dataSource.view();
for (var i = 0; i < data.length; i++) {
var dataItem = data[i];
var tr = $("#grid").find("[data-uid='" + dataItem.uid + "']");