mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Donut charts fix.
This commit is contained in:
parent
03ed32ef9b
commit
088233d8d2
@ -53,7 +53,7 @@ class Morris.Donut
|
||||
# If you need to re-size your charts, call this method after changing the
|
||||
# size of the container element.
|
||||
redraw: ->
|
||||
@el.clear()
|
||||
@el.empty()
|
||||
|
||||
@r = new Raphael(@el[0])
|
||||
|
||||
|
@ -87,12 +87,13 @@
|
||||
}
|
||||
this.data = options.data;
|
||||
this.el.addClass('graph-initialised');
|
||||
this.r = new Raphael(this.el[0]);
|
||||
this.draw();
|
||||
this.redraw();
|
||||
}
|
||||
|
||||
Donut.prototype.draw = function() {
|
||||
Donut.prototype.redraw = function() {
|
||||
var C, cx, cy, d, idx, last, max_value, min, next, seg, total, w, x, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
|
||||
this.el.empty();
|
||||
this.r = new Raphael(this.el[0]);
|
||||
cx = this.el.width() / 2;
|
||||
cy = this.el.height() / 2;
|
||||
w = (Math.min(cx, cy) - 10) / 3;
|
||||
|
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user