Last active
August 29, 2015 14:04
-
-
Save pawl/e8e2b246365c60755403 to your computer and use it in GitHub Desktop.
Change Percent To Numbers and Keep Color - Flot Pie Chart
This file contains hidden or 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
options = { | |
series: { | |
pie: { | |
innerRadius: 0.5, | |
show: true, | |
label: { | |
show: true, | |
formatter: function (label, series) { | |
console.log(series); | |
return '<div style="font-size:8pt;text-align:center;padding:2px; color: ' + series.color +';">' + label + '<br/>' + series.data[0][1] + '</div>'; | |
}, | |
} | |
} | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment