]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Draw radial scale angle lines before tick labels (#5855)
authorStef Louwers <fhp@full-hyperion.nl>
Tue, 27 Nov 2018 14:14:41 +0000 (15:14 +0100)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Tue, 27 Nov 2018 14:14:41 +0000 (15:14 +0100)
Moved drawing of radial lines before drawing the tick labels, such that the radial lines are not drawn on top of the tick labels and their backdrop.

src/scales/scale.radialLinear.js

index 90ac22f0db7db1deae789ba6478d85c05c520859..ffd76dd43f477ace2a636c7404ce0f440a41c68e 100644 (file)
@@ -497,6 +497,10 @@ module.exports = function(Chart) {
                                var tickFontFamily = valueOrDefault(tickOpts.fontFamily, globalDefaults.defaultFontFamily);
                                var tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);
 
+                               if (opts.angleLines.display || opts.pointLabels.display) {
+                                       drawPointLabels(me);
+                               }
+
                                helpers.each(me.ticks, function(label, index) {
                                        // Don't draw a centre value (if it is minimum)
                                        if (index > 0 || tickOpts.reverse) {
@@ -534,10 +538,6 @@ module.exports = function(Chart) {
                                                }
                                        }
                                });
-
-                               if (opts.angleLines.display || opts.pointLabels.display) {
-                                       drawPointLabels(me);
-                               }
                        }
                }
        });