Skip to content

Instantly share code, notes, and snippets.

@Pierry
Created October 1, 2013 13:20
Show Gist options
  • Save Pierry/6778332 to your computer and use it in GitHub Desktop.
Save Pierry/6778332 to your computer and use it in GitHub Desktop.
Criando gráfico donut com dados
<!-- donut chart div -->
<div id="donut"></div>
// Add chart configuration code
var data = [{
name: "Burke",
potConsumed: 54
}, {
name: "Brandon",
potConsumed: 11
}, {
name: "John",
potConsumed: 18
}, {
name: "Stefan",
potConsumed: 7,
winner: true
}, {
name: "Todd",
potConsumed: 10
}];
$('#donut').kendoChart({
theme: "BlueOpal",
title: {
text: "Donut consumindos pela equipe"
},
dataSource: data,
series:[{
type: "donut",
field: "potConsumed",
categoryField: "name",
explodeField: "winner"
}],
tooltip: {
visible: true,
template: "#= category #; #=value #%"
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment