mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
Remove some unused scale code
This commit is contained in:
parent
b5c69984e3
commit
b0bddce017
@ -40,44 +40,6 @@
|
|||||||
return scaleInstance.options.position == "bottom";
|
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.
|
// Essentially we now have any number of scales on each of the 4 sides.
|
||||||
// Our canvas looks like the following.
|
// 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
|
// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and
|
||||||
|
Loading…
Reference in New Issue
Block a user