We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
.resize()
1 parent 7252951 commit aa2dc93Copy full SHA for aa2dc93
2 files changed
README.md
@@ -133,6 +133,11 @@ the chart on changes.
133
134
# Events
135
136
+angular-chart.js listens to the following events on the `scope` and acts accordingly:
137
+
138
+* `$destroy`: call `.destroy()` on the chart
139
+* `$resize`: call `.resize()` on the chart
140
141
angular-chart.js emits the following events on the `scope` and pass the chart as argument:
142
143
* `chart-create`: when chart is created
angular-chart.js
@@ -140,6 +140,10 @@
destroyChart(chart, scope);
});
+ scope.$on('$resize', function () {
144
+ if (chart) chart.resize();
145
+ });
146
147
function resetChart (newVal, oldVal) {
148
if (isEmpty(newVal)) return;
149
if (angular.equals(newVal, oldVal)) return;
0 commit comments