diff --git a/projects/gp-smart-echart-widget/src/lib/gp-smart-echart-widget.component.ts b/projects/gp-smart-echart-widget/src/lib/gp-smart-echart-widget.component.ts
index 5de0e8e..101f8ab 100644
--- a/projects/gp-smart-echart-widget/src/lib/gp-smart-echart-widget.component.ts
+++ b/projects/gp-smart-echart-widget/src/lib/gp-smart-echart-widget.component.ts
@@ -180,6 +180,9 @@ export class GpSmartEchartWidgetComponent implements OnInit {
if (!userInput.aggrList) {
userInput.aggrList = [];
}
+ if (!userInput.stackList) {
+ userInput.stackList = [];
+ }
if (this.serviceData) {
this.dataChart.hideLoading();
let axisFontSize = 0;
diff --git a/projects/gp-smart-echart-widget/src/lib/smart-chart-config/smart-chart-config.component.ts b/projects/gp-smart-echart-widget/src/lib/smart-chart-config/smart-chart-config.component.ts
index 0c2645d..174c158 100644
--- a/projects/gp-smart-echart-widget/src/lib/smart-chart-config/smart-chart-config.component.ts
+++ b/projects/gp-smart-echart-widget/src/lib/smart-chart-config/smart-chart-config.component.ts
@@ -280,6 +280,11 @@ export class SmartChartConfigComponent implements OnInit {
} else {
this.isAggrAdded = true;
}
+ if (!this.config.stackList) {
+ this.config.stackList = [];
+ } else {
+ this.config.addStack = true;
+ }
this.config.legend = {};
// Default value for datahub sql query
if (this.config.datahubUrl === null || this.config.datahubUrl === undefined) {
@@ -355,7 +360,7 @@ export class SmartChartConfigComponent implements OnInit {
this.config.layout = val.layout[0].id;
}
});
- }else {
+ } else {
this.chartData.chartLayout.filter(val => {
if (value === val.id) {
this.chartLayoutData = val.layout;
@@ -363,7 +368,7 @@ export class SmartChartConfigComponent implements OnInit {
}
});
}
- }else {
+ } else {
sessionStorage.setItem('chartType', this.config.type);
}
if (this.config.type === 'bar' || this.config.type === 'line') {