From 1450c15eaa134243dfb336629fd57c7a1c6d6887 Mon Sep 17 00:00:00 2001 From: Ziang Song Date: Wed, 27 Sep 2017 18:18:23 -0400 Subject: [PATCH] Fixed the issue of unable to redraw when options is updated. --- angular-vis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-vis.js b/angular-vis.js index fca672d..5169f2d 100644 --- a/angular-vis.js +++ b/angular-vis.js @@ -215,12 +215,12 @@ angular.module('ngVis', []) } }); - scope.$watchCollection('options', function (options) { + scope.$watch('options', function (options) { if (graph == null) { return; } graph.setOptions(options); - }); + }, true); } }; })