]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Make PointLabels color scriptable (#8194)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Fri, 18 Dec 2020 17:36:38 +0000 (19:36 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 17:36:38 +0000 (12:36 -0500)
src/scales/scale.radialLinear.js

index a23a5ef662a0111ee3bfb0f0e8c138eca1c1512e..ceb661e711a52af161bedc08bed0a363f04d2629 100644 (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);