Skip to content

Commit a4584d9

Browse files
author
Ng Yew Choong
committed
Partial fix for issue #16.
1 parent da3d0f1 commit a4584d9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rickshaw.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ angular.module('angular-rickshaw', [])
4040
var graph;
4141
var settings;
4242

43+
function redraw() {
44+
graph.setSize();
45+
graph.render();
46+
}
47+
4348
function update() {
4449
if (!graph) {
4550
mainEl = angular.element(element);
@@ -78,8 +83,7 @@ angular.module('angular-rickshaw', [])
7883
}
7984
}
8085

81-
graph.setSize();
82-
graph.render();
86+
redraw();
8387

8488
if (scope.features && scope.features.xAxis) {
8589
var xAxisConfig = {
@@ -165,7 +169,7 @@ angular.module('angular-rickshaw', [])
165169
});
166170

167171
scope.$on('rickshaw::resize', function() {
168-
update();
172+
redraw();
169173
});
170174

171175
update();

0 commit comments

Comments
 (0)