[SSE] Check chart type

This commit is contained in:
Julia Radzhabova 2020-07-15 13:21:32 +03:00
parent ad9cce3946
commit 57c038ff0c

View file

@ -1484,31 +1484,29 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
}, },
isRangeValid: function() { isRangeValid: function() {
return true; if (this.isChart) {
// if (this.isChart) { var isvalid,
// var isvalid; range = this.chartSettings.getRange();
// if (!_.isEmpty(this.txtDataRange.getValue())) { if (!_.isEmpty(range)) {
// var rec = this.mnuChartTypePicker.getSelectedRec(), var rec = this.mnuChartTypePicker.getSelectedRec(),
// type = (rec) ? rec.get('type') : this.currentChartType; type = (rec) ? rec.get('type') : this.currentChartType;
//
// isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, this.txtDataRange.getValue(), true, this.cmbDataDirect.getValue()==0, type); isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, !this.chartSettings.getInColumns(), type);
// if (isvalid == Asc.c_oAscError.ID.No) if (isvalid == Asc.c_oAscError.ID.No)
// return true; return true;
// } else } else
// return true; return true;
//
// this.setActiveCategory(0); this.setActiveCategory(0);
// if (isvalid == Asc.c_oAscError.ID.StockChartError) { if (isvalid == Asc.c_oAscError.ID.StockChartError) {
// Common.UI.warning({msg: this.errorStockChart}); Common.UI.warning({msg: this.errorStockChart});
// } else if (isvalid == Asc.c_oAscError.ID.MaxDataSeriesError) { } else if (isvalid == Asc.c_oAscError.ID.MaxDataSeriesError) {
// Common.UI.warning({msg: this.errorMaxRows}); Common.UI.warning({msg: this.errorMaxRows});
// } else if (isvalid == Asc.c_oAscError.ID.MaxDataPointsError) } else if (isvalid == Asc.c_oAscError.ID.MaxDataPointsError)
// Common.UI.warning({msg: this.errorMaxPoints}); Common.UI.warning({msg: this.errorMaxPoints});
// else return false;
// this.txtDataRange.cmpEl.find('input').focus(); } else
// return false; return true;
// } else
// return true;
}, },
// onSelectData: function() { // onSelectData: function() {