]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
core.scale cleanup (#7067)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Thu, 6 Feb 2020 23:17:05 +0000 (15:17 -0800)
committerGitHub <noreply@github.com>
Thu, 6 Feb 2020 23:17:05 +0000 (18:17 -0500)
src/core/core.scale.js

index 92e6d7089c66841decf6bf82afbe54ce2c7ed78e..cc3d55002f2073e7e5d9bf21cdbac38aa80df7fd 100644 (file)
@@ -293,6 +293,9 @@ class Scale extends Element {
                return {min, max};
        }
 
+       /**
+        * @private
+        */
        _invalidateCaches() {}
 
        /**
@@ -1060,8 +1063,8 @@ class Scale extends Element {
                        });
                }
 
-               items.ticksLength = ticksLength;
-               items.borderValue = borderValue;
+               me._ticksLength = ticksLength;
+               me._borderValue = borderValue;
 
                return items;
        }
@@ -1206,10 +1209,10 @@ class Scale extends Element {
                        const firstLineWidth = axisWidth;
                        context = {
                                scale: me,
-                               tick: me.ticks[items.ticksLength - 1],
+                               tick: me.ticks[me._ticksLength - 1],
                        };
-                       const lastLineWidth = resolve([gridLines.lineWidth, 1], context, items.ticksLength - 1);
-                       const borderValue = items.borderValue;
+                       const lastLineWidth = resolve([gridLines.lineWidth, 1], context, me._ticksLength - 1);
+                       const borderValue = me._borderValue;
                        let x1, x2, y1, y2;
 
                        if (me.isHorizontal()) {
@@ -1424,6 +1427,9 @@ class Scale extends Element {
                return result;
        }
 
+       /**
+        * @private
+        */
        _resolveTickFontOptions(index) {
                const me = this;
                const options = me.options.ticks;