]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Scriptable tick colours (#8222)
authorEvert Timberg <evert.timberg+github@gmail.com>
Tue, 22 Dec 2020 17:11:00 +0000 (12:11 -0500)
committerGitHub <noreply@github.com>
Tue, 22 Dec 2020 17:11:00 +0000 (12:11 -0500)
src/core/core.scale.js

index d04160bf7f9e656a199a9f045afce30e903fef22..e844544f191ee53daa0838a2cab3647a0be9a1ad 100644 (file)
@@ -1385,6 +1385,7 @@ export default class Scale extends Element {
                        lineHeight = font.lineHeight;
                        lineCount = isArray(label) ? label.length : 1;
                        const halfCount = lineCount / 2;
+                       const color = resolve([optionTicks.color], me.getContext(i), i);
 
                        if (isHorizontal) {
                                x = pixel;
@@ -1421,7 +1422,7 @@ export default class Scale extends Element {
                                rotation,
                                label,
                                font,
-                               color: optionTicks.color,
+                               color,
                                textOffset,
                                textAlign,
                                textBaseline,