fix problems with low result count breaking insights (#1052)

This commit is contained in:
Anthony Dresser
2018-04-06 15:54:43 -07:00
committed by Karl Burtram
parent 86748e6d69
commit bec8e72688
2 changed files with 24 additions and 5 deletions

View File

@@ -351,7 +351,9 @@ export class ChartViewerComponent implements OnInit, OnDestroy, IChartViewAction
this.componentHost.viewContainerRef.clear();
let componentRef = this.componentHost.viewContainerRef.createComponent(componentFactory);
this._chartComponent = <ChartInsight>componentRef.instance;
this._chartComponent.setConfig(this._chartConfig);
if (this._chartComponent.setConfig) {
this._chartComponent.setConfig(this._chartConfig);
}
this._chartComponent.data = this._executeResult;
this._chartComponent.options = mixin(this._chartComponent.options, { animation: { duration: 0 } });
if (this._chartComponent.init) {