From 029ad640ac0883f9b3802bc9e7c5e19fbe4f8df1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 8 Dec 2020 21:23:18 +0300 Subject: [PATCH] [SSE] Fix changing chart type --- apps/spreadsheeteditor/main/app/view/ChartTypeDialog.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/ChartTypeDialog.js b/apps/spreadsheeteditor/main/app/view/ChartTypeDialog.js index 4b3af205a..043889d85 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartTypeDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ChartTypeDialog.js @@ -279,9 +279,8 @@ define([ rawData = record; } var isCombo = rawData.type==Asc.c_oAscChartTypeSettings.comboBarLine || rawData.type==Asc.c_oAscChartTypeSettings.comboBarLineSecondary || - rawData.type==Asc.c_oAscChartTypeSettings.comboAreaBar || rawData.type==Asc.c_oAscChartTypeSettings.comboCustom, - series = isCombo ? this.chartSettings.getSeries() : []; - if (isCombo && series.length<2) { + rawData.type==Asc.c_oAscChartTypeSettings.comboAreaBar || rawData.type==Asc.c_oAscChartTypeSettings.comboCustom; + if (isCombo && this.chartSettings.getSeries().length<2) { Common.UI.warning({msg: this.errorComboSeries, maxwidth: 600}); return; } @@ -291,7 +290,7 @@ define([ this.chartSettings.changeType(this.currentChartType); this.ShowHideSettings(this.currentChartType); if (isCombo) - this.updateSeriesList(series); + this.updateSeriesList(this.chartSettings.getSeries()); else this.updateChartStyles(this.api.asc_getChartPreviews(this.currentChartType)); },