Charts refactoring

This commit is contained in:
Julia Radzhabova 2021-02-20 16:54:09 +03:00
parent edd0580546
commit b4e8567481
3 changed files with 3 additions and 3 deletions

View file

@ -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 {

View file

@ -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 '';

View file

@ -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