I'm using morris.js charts which are fantastically easy to setup but I can't workout how to change the color for labels when rendering a Donut graph. By default it prints them in black but I want the graph on top of a dark background.
Does anyone know how to change the label color?
I'm using morris.js charts which are fantastically easy to setup but I can't workout how to change the color for labels when rendering a Donut graph. By default it prints them in black but I want the graph on top of a dark background.
Does anyone know how to change the label color?
Share Improve this question asked Dec 11, 2012 at 0:11 RomanRoman 10.4k18 gold badges69 silver badges103 bronze badges2 Answers
Reset to default 4<div id="bar-chart" class="morris-chart" style="height: 180px"></div>
.morris-chart text {
fill: white;
}
To change the label color, simply add labelColor
property to Morris.Donut config object like below
Morris.Donut({
labelColor: '#FFF'
});