Skip to content

Commit

Permalink
Merge pull request #476 from Kitware/resize-fix
Browse files Browse the repository at this point in the history
Fix autoresize problem in VegaCharts
  • Loading branch information
Roni Choudhury committed Feb 14, 2017
2 parents 9b4a891 + 03908a1 commit 04e0e8d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion VisComponent/mixin/VegaChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ let VegaChart = (Base, spec) => class extends Base {
}

render () {
this.chart.then(chart => chart.update());
this.chart.then(chart => {
if (this.width) {
chart = chart.width(this.width);
}

if (this.height) {
chart = chart.height(this.height);
}

chart.update();
});
}

get serializationFormats () {
Expand Down

0 comments on commit 04e0e8d

Please sign in to comment.