mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
fix default font color for legend (#8139)
* fix default font color for legend * adjusted docs to be consistent with fontColor to color
This commit is contained in:
parent
9b7eb5095a
commit
ae04fcf3c3
@ -125,7 +125,7 @@ var chart = new Chart(ctx, {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
fontColor: 'rgb(255, 99, 132)'
|
||||
color: 'rgb(255, 99, 132)'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ export class Legend extends Element {
|
||||
const rtlHelper = getRtlAdapter(opts.rtl, me.left, me._minSize.width);
|
||||
const ctx = me.ctx;
|
||||
const labelFont = toFont(labelOpts.font, me.chart.options.font);
|
||||
const fontColor = labelOpts.color;
|
||||
const fontColor = labelOpts.color || defaultColor;
|
||||
const fontSize = labelFont.size;
|
||||
let cursor;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user