Skip to content

Instantly share code, notes, and snippets.

@jigewxy
Created February 6, 2018 07:44
Show Gist options
  • Save jigewxy/7684e50e24c4b26b2fa2879993606522 to your computer and use it in GitHub Desktop.
Save jigewxy/7684e50e24c4b26b2fa2879993606522 to your computer and use it in GitHub Desktop.
kendo chart, format percentage strings
$(chartId).kendoChart({
theme: 'bootstrap',
title: {
position: "bottom",
text: chartTitle,
color: "#ffffff",
fontSize: "22px"
},
legend: {
visible: false
},
chartArea: {
background: ""
},
seriesDefaults: {
labels: {
visible: true,
background: "transparent",
color: "#ffffff",
template: "#= category #: - #= kendo.format('{0:P}', percentage)#"
}
},
series: [{
type: "pie",
startAngle: 150,
data: chartData
}],
tooltip: {
visible: true,
format: "{0} tasks"
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment