Remove some unused scale code

This commit is contained in:
Evert Timberg 2015-06-13 11:45:30 -04:00
parent b5c69984e3
commit b0bddce017

View File

@ -40,44 +40,6 @@
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