Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
A firefox fix in Chart.Core.Js actually breaks the Chart.js library on Firefox and Internet Explorer #1198
I had some trouble with Internet Explorer and Firefox and after some digging I found out that on these 2 browsers the style attribute of the chart canvas is not right. The Height/Width values will be 0 and this means that I can not see any charts.
I am using Knockback.js, this might be a part of the issue. I also calculate the height and width of the canvas myself, which is also not required. This might also be a part of the issue.
As you can see, Internet Explorer and Firefox's Height and Width are 0. This is WRONG and causes the Canvas not to draw the chart!
In the Chart.Core.Js file, around line 43, it says the following:
If you disable these lines, the charts will work Perfectly on Internet Explorer and Firefox. I hope someone can look into this problem!
I've the same issue with Firefox when the chart is wrapped inside Backbone.Marionette view but the same code works in Chrome meaning the chart is showing fine.
I’m suspecting that it has to do with what is returned by computeDimension()
Under Chrome, it returns an empty string and null for “Width” and “Height” respectively.
Under Firefox, it returns “auto” and empty string for “Width” and “Height” respectively.