Angular-chart.js – define set Y axis width

0👍

Actually, I think I figured out a very basic and static way for setting the width.

In chart.js (version 1.0.2), line 1576:

this.yLabelWidth = (this.display && this.showLabels) ? longestText(this.ctx,this.font,this.yLabels) + 10 : 0;

I simply changed that to a static number, ’93’.

this.yLabelWidth = 93;

I’m sure with a bit more tinkering I can call the width of the first cell in the table get them both to be the same.

Leave a comment