From d84e80d8fde8ecf8e023f484514e52a89622d2b7 Mon Sep 17 00:00:00 2001 From: brainfloat Date: Wed, 6 Aug 2014 11:47:42 +0100 Subject: [PATCH] Add chart.update method to global api --- src/angular-nvd3.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/angular-nvd3.js b/src/angular-nvd3.js index ab1cf8c..9672f63 100644 --- a/src/angular-nvd3.js +++ b/src/angular-nvd3.js @@ -26,6 +26,10 @@ refresh: function(){ scope.api.updateWithOptions(scope.options); }, + // Update chart layout (for example if container is resized) + update: function() { + scope.chart.update(); + }, // Update chart with new options updateWithOptions: function(options){ // Clearing