mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
13396c72b3
@ -44,6 +44,9 @@ Guidlines:
|
||||
- Please make your commits in logical sections with clear commit messages
|
||||
- Please avoid committing in the build Chart.js & Chart.min.js file, as it may cause conflicts when merging back
|
||||
|
||||
Joining the Project
|
||||
-------------
|
||||
- Active committers and contributors are invited to introduce yourself and request commit access to this project. Please send an email to hello@nickdownie.com or file an issue.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
21
Chart.js
vendored
21
Chart.js
vendored
@ -25,8 +25,25 @@
|
||||
this.ctx = context;
|
||||
|
||||
//Variables global to the chart
|
||||
var width = this.width = context.canvas.width;
|
||||
var height = this.height = context.canvas.height;
|
||||
var computeDimension = function(element,dimension)
|
||||
{
|
||||
if (element['offset'+dimension])
|
||||
{
|
||||
return element['offset'+dimension];
|
||||
}
|
||||
else
|
||||
{
|
||||
return document.defaultView.getComputedStyle(element).getPropertyValue(dimension);
|
||||
}
|
||||
}
|
||||
|
||||
var width = this.width = computeDimension(context.canvas,'Width');
|
||||
var height = this.height = computeDimension(context.canvas,'Height');
|
||||
|
||||
// Firefox requires this to work correctly
|
||||
context.canvas.width = width;
|
||||
context.canvas.height = height;
|
||||
|
||||
this.aspectRatio = this.width / this.height;
|
||||
//High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.
|
||||
helpers.retinaScale(this);
|
||||
|
||||
@ -195,6 +195,8 @@
|
||||
helpers.each(this.segments,function(segment){
|
||||
segment.save();
|
||||
});
|
||||
|
||||
this.reflow();
|
||||
this.render();
|
||||
},
|
||||
reflow : function(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user