How to change label color in Morris.js charts?
10,976
Solution 1
<div id="bar-chart" class="morris-chart" style="height: 180px"></div>
.morris-chart text {
fill: white;
}
Solution 2
To change the label color, simply add labelColor
property to Morris.Donut config object like below
Morris.Donut({
labelColor: '#FFF'
});
Author by
Roman
Updated on June 27, 2022Comments
-
Roman about 2 years
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?