Make PointLabels color scriptable (#8194)

This commit is contained in:
Jukka Kurkela 2020-12-18 19:36:38 +02:00 committed by GitHub
parent b2d5a5fa97
commit 04c45aacda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,7 @@ function drawPointLabels(scale) {
const context = scale.getContext(i);
const plFont = toFont(resolve([pointLabelOpts.font], context, i), scale.chart.options.font);
ctx.font = plFont.string;
ctx.fillStyle = pointLabelOpts.color;
ctx.fillStyle = resolve([pointLabelOpts.color], context, i);
const angle = toDegrees(scale.getIndexAngle(i));
ctx.textAlign = getTextAlignForAngle(angle);