The problem is that the height and width attribute values ββare saved in the chart and are not updated in the same way as other attributes. To fix this, you must add a listener to the create event and manually change the height in the chart object
HTML:
<canvas id="chart" class="chart chart-horizontal-bar" chart-data="chart.data" chart-labels="chart.data.labels" chart-series="chart.series" chart-options="chart.options" chart-colors="chart.colors" height="{{ compareChart.height }}" width="{{ compareChart.width }}" ></canvas>
JS:
$scope.$on('chart-create', function (event, chart) { chart.chart.height = $scope.chart.height; });
You would expect $scope.chart.height change during an AJAX search or something that would bring in new data.
source share