Skip to content

Commit 03908a1

Browse files
committed
fix(VegaChart): properly interpret this.width and this.height in rendering a Vega chart
1 parent 9b4a891 commit 03908a1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

VisComponent/mixin/VegaChart.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@ let VegaChart = (Base, spec) => class extends Base {
88
}
99

1010
render () {
11-
this.chart.then(chart => chart.update());
11+
this.chart.then(chart => {
12+
if (this.width) {
13+
chart = chart.width(this.width);
14+
}
15+
16+
if (this.height) {
17+
chart = chart.height(this.height);
18+
}
19+
20+
chart.update();
21+
});
1222
}
1323

1424
get serializationFormats () {

0 commit comments

Comments
 (0)