Skip to content

Commit 1869543

Browse files
Fix to allow setting of sparkline chart height in config.
The config value was getting over-written by ‘undefined’ when the chart-height value is not set.
1 parent 6a2e71c commit 1869543

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

dist/angular-patternfly.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,9 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ["c3ChartDefau
16221622
scope.config = pfUtils.merge(scope.defaultConfig, scope.config);
16231623
}, true);
16241624
scope.$watch('chartHeight', function () {
1625-
scope.config.size.height = scope.chartHeight;
1625+
if (scope.chartHeight) {
1626+
scope.config.size.height = scope.chartHeight;
1627+
}
16261628
});
16271629
scope.$watch('showXAxis', function () {
16281630
scope.config.axis.x.show = scope.showXAxis === true;

0 commit comments

Comments
 (0)