Created
October 1, 2013 13:20
-
-
Save Pierry/6778332 to your computer and use it in GitHub Desktop.
Criando gráfico donut com dados
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- donut chart div --> | |
<div id="donut"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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