From b4e8567481aab76537055543ddb71337c86b7af0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 20 Feb 2021 16:54:09 +0300 Subject: [PATCH] Charts refactoring --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 2 +- apps/spreadsheeteditor/main/app/view/ChartSettings.js | 2 +- apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 08103004f..96938a5b0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1090,7 +1090,7 @@ define([ if (props) { (ischartedit) ? props.changeType(type) : props.putType(type); var range = props.getRange(), - isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, !props.getInColumns(), props.getType()) : Asc.c_oAscError.ID.No; + isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, props.getInRows(), props.getType()) : Asc.c_oAscError.ID.No; if (isvalid == Asc.c_oAscError.ID.No) { (ischartedit) ? me.api.asc_editChartDrawingObject(props) : me.api.asc_addChartDrawingObject(props); } else { diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index 961ec35c0..7757c489d 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -859,7 +859,7 @@ define([ validation = function(value) { var isvalid; if (!_.isEmpty(value)) { - isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, true, !props.getInColumns(), me._state.ChartType); + isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, true, props.getInRows(), me._state.ChartType); if (isvalid == Asc.c_oAscError.ID.No) return true; } else return ''; diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js index 90382ec6d..8e8472f1f 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js @@ -1572,7 +1572,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' var rec = this.mnuChartTypePicker.getSelectedRec(); rec && (type = rec.get('type')); } - isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, !this.chartSettings.getInColumns(), type); + isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, this.chartSettings.getInRows(), type); if (isvalid == Asc.c_oAscError.ID.No) return true; } else