Change the color of displayed values in pie chart

๐Ÿ‘:0

In var defaults = {}, set the color attribute to whatever color you want the value label text to be.

Currently, the value of color is set to undefined:

/**
 * The color used to draw the label text.
 * @member {String|Array|Function}
 * @default undefined (use Chart.defaults.global.defaultFontColor)
 */
color: undefined,

If you want all the values to be the same color, just set color to a single string like the following:

 color: 'green'

If you want each label to be a different color, as mentioned in the comment above the attribute, you can also set the value of color to an array like the following:

color: ['green', 'red', 'blue']

Working JSFiddle Link: http://jsfiddle.net/s9tu1c9y/132/

Leave a comment