Created
October 14, 2014 20:58
-
-
Save Hexagon/87b5357a91e7e7ef3487 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Measure space usage on axises, we need to do this before drawing anything | |
i = 0; | |
while ((dataset = this.datasets[i++])) { | |
axises = [[this.yAxises[dataset.y.axis],1,2],[this.xAxises[dataset.x.axis],3,0]]; | |
for (j = 0; j < axises.length; j++) { | |
axis = axises[j]; | |
if (!axis[0]._measured) { | |
temp = parseInt(axis[0].font.split(' ')[0]); | |
padding[axis[(axis[0].axis % 2) ? 1 : 2]] += margin + (axis[0].scale?axis[0].majorTickHeight:0) + (axis[0].name?temp:0) + (axis[0].labels?temp:0); | |
axis[0]._measured=true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment