]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Remove some unused scale code
authorEvert Timberg <evert.timberg@gmail.com>
Sat, 13 Jun 2015 15:45:30 +0000 (11:45 -0400)
committerEvert Timberg <evert.timberg@gmail.com>
Sat, 13 Jun 2015 15:45:30 +0000 (11:45 -0400)
src/core/core.scale.js

index ce5c82460036e0983c5b64a9aeace72ef5ad644b..7494d14c865cd930229b3e97ee85eb1c46a227a2 100644 (file)
                                        return scaleInstance.options.position == "bottom";
                                });
 
-                               var visibleLeftScales = helpers.where(chartInstance.scales, function(scaleInstance) {
-                                       return scaleInstance.options.position == "left";
-                               });
-                               var visibleRightScales = helpers.where(chartInstance.scales, function(scaleInstance) {
-                                       return scaleInstance.options.position == "right";
-                               });
-                               var visibleTopScales = helpers.where(chartInstance.scales, function(scaleInstance) {
-                                       return scaleInstance.options.position == "top";
-                               });
-                               var visibleBottomScales = helpers.where(chartInstance.scales, function(scaleInstance) {
-                                       return scaleInstance.options.position == "bottom";
-                               });
-
-                               // // Adjust the padding to take into account displaying labels
-                               // if (topScales.length === 0 || bottomScales.length === 0) {
-                               //     var maxFontHeight = 0;
-
-                               //     var maxFontHeightFunction = function(scaleInstance) {
-                               //         if (scaleInstance.options.labels.show) {
-                               //             // Only consider font sizes for axes that actually show labels
-                               //             maxFontHeight = Math.max(maxFontHeight, scaleInstance.options.labels.fontSize);
-                               //         }
-                               //     };
-
-                               //     helpers.each(leftScales, maxFontHeightFunction);
-                               //     helpers.each(rightScales, maxFontHeightFunction);
-
-                               //     if (topScales.length === 0) {
-                               //         // Add padding so that we can handle drawing the top nicely
-                               //         yPadding += 0.75 * maxFontHeight; // 0.75 since padding added on both sides
-                               //     }
-
-                               //     if (bottomScales.length === 0) {
-                               //         // Add padding so that we can handle drawing the bottom nicely
-                               //         yPadding += 1.5 * maxFontHeight;
-                               //     }
-                               // }
-
                                // Essentially we now have any number of scales on each of the 4 sides.
                                // Our canvas looks like the following.
                                // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and