diff --git a/apps/pdfeditor/main/app.js b/apps/pdfeditor/main/app.js index f42683833b..3eed27ed7f 100644 --- a/apps/pdfeditor/main/app.js +++ b/apps/pdfeditor/main/app.js @@ -151,7 +151,7 @@ require([ 'Common.Controllers.Comments', 'Common.Controllers.Draw', 'Common.Controllers.Plugins', - // 'Common.Controllers.ExternalDiagramEditor', + 'Common.Controllers.ExternalDiagramEditor', // 'Common.Controllers.ExternalOleEditor', 'Common.Controllers.Protection' ] @@ -187,7 +187,7 @@ require([ 'common/main/lib/controller/Chat', /** coauthoring end **/ 'common/main/lib/controller/Plugins', - // 'common/main/lib/controller/ExternalDiagramEditor', + 'common/main/lib/controller/ExternalDiagramEditor', // 'common/main/lib/controller/ExternalOleEditor', 'common/main/lib/controller/Draw', 'common/main/lib/controller/Protection' diff --git a/apps/pdfeditor/main/app/controller/DocumentHolderExt.js b/apps/pdfeditor/main/app/controller/DocumentHolderExt.js index 93de8ed800..b73ebe30df 100644 --- a/apps/pdfeditor/main/app/controller/DocumentHolderExt.js +++ b/apps/pdfeditor/main/app/controller/DocumentHolderExt.js @@ -174,7 +174,7 @@ define([], function () { view.menuEditHyperlinkTable.on('click', _.bind(me.editHyperlink, me)); view.menuRemoveHyperlinkPara.on('click', _.bind(me.removeHyperlink, me)); view.menuRemoveHyperlinkTable.on('click', _.bind(me.removeHyperlink, me)); - // view.menuChartEdit.on('click', _.bind(me.editChartClick, me, undefined)); + view.menuChartEdit.on('click', _.bind(me.editChartClick, me, undefined)); view.menuImgSaveAsPicture.on('click', _.bind(me.saveAsPicture, me)); view.menuTableSaveAsPicture.on('click', _.bind(me.saveAsPicture, me)); view.menuAddCommentPara.on('click', _.bind(me.addComment, me)); @@ -197,7 +197,7 @@ define([], function () { view.menuImgEditPoints.on('click', _.bind(me.onImgEditPoints, me)); view.menuShapeAdvanced.on('click', _.bind(me.onShapeAdvanced, me)); view.menuParagraphAdvanced.on('click', _.bind(me.onParagraphAdvanced, me)); - // view.menuChartAdvanced.on('click', _.bind(me.onChartAdvanced, me)); + view.menuChartAdvanced.on('click', _.bind(me.onChartAdvanced, me)); view.mnuGroupImg.on('click', _.bind(me.onGroupImg, me)); view.mnuUnGroupImg.on('click', _.bind(me.onUnGroupImg, me)); view.mnuArrangeFront.on('click', _.bind(me.onArrangeFront, me)); @@ -229,12 +229,14 @@ define([], function () { dh.applyEditorMode = function() { if (this.mode && this.mode.isPDFEdit && this._state.initEditorEvents && Common.Controllers.LaunchController.isScriptLoaded()) { + this.initExternalEditors(); this.documentHolder.createDelayedElementsPDFEditor(); this._state.initEditorEvents = false; this.api.asc_registerCallback('asc_onShowMathTrack', _.bind(this.onShowMathTrack, this)); this.api.asc_registerCallback('asc_onHideMathTrack', _.bind(this.onHideMathTrack, this)); this.api.asc_registerCallback('asc_onDialogAddHyperlink', _.bind(this.onDialogAddHyperlink, this)); this.api.asc_registerCallback('asc_ChangeCropState', _.bind(this.onChangeCropState, this)); + this.api.asc_registerCallback('asc_doubleClickOnChart', _.bind(this.onDoubleClickOnChart, this)); } if (this.mode) this.mode.isPDFEdit ? this.onHideTextBar() : this.onHideMathTrack(); @@ -2193,6 +2195,39 @@ define([], function () { } }; + dh.onChartAdvanced = function(item, e){ + var me = this; + if (me.api) { + var selectedElements = me.api.getSelectedElements(); + + if (selectedElements && selectedElements.length > 0){ + var elType, elValue; + for (var i = selectedElements.length - 1; i >= 0; i--) { + elType = selectedElements[i].get_ObjectType(); + elValue = selectedElements[i].get_ObjectValue(); + + if (Asc.c_oAscTypeSelectElement.Chart == elType) { + (new PE.Views.ChartSettingsAdvanced( + { + chartProps: elValue, + slideSize: PE.getController('Toolbar').currentPageSize, + handler: function(result, value) { + if (result == 'ok') { + if (me.api) { + me.api.ChartApply(value.chartProps); + } + } + me.editComplete(); + Common.component.Analytics.trackEvent('DocumentHolder', 'Chart Settings Advanced'); + } + })).show(); + break; + } + } + } + } + }; + dh.onParagraphAdvanced = function(item) { var me = this; if (me.api){ @@ -2554,5 +2589,57 @@ define([], function () { !Common.Utils.InternalSettings.get('pdfe-settings-annot-bar') && this.onHideAnnotBar(); }; + dh.initExternalEditors = function() { + var me = this, + decontroller = this.getApplication().getController('Common.Controllers.ExternalDiagramEditor'); + decontroller.setApi(this.api).loadConfig({config:this.mode, customization: this.mode.customization}); + var diagramEditor = decontroller.getView('Common.Views.ExternalDiagramEditor'); + if (diagramEditor) { + diagramEditor.on('internalmessage', _.bind(function(cmp, message) { + var command = message.data.command; + var data = message.data.data; + if (this.api) { + (diagramEditor.isEditMode()) + ? this.api.asc_editChartDrawingObject(data) + : this.api.asc_addChartDrawingObject(data); + } + }, this)); + diagramEditor.on('hide', _.bind(function(cmp, message) { + if (this.api) { + this.api.asc_onCloseChartFrame(); + this.api.asc_enableKeyEvents(true); + } + setTimeout(function(){ + me.editComplete(); + }, 10); + }, this)); + } + }; + + dh.onDoubleClickOnChart = function(chart) { + if (!Common.Controllers.LaunchController.isScriptLoaded()) return; + if (this.mode && this.mode.isEdit && this.mode.isPDFEdit && !this._isDisabled) { + var diagramEditor = this.getApplication().getController('Common.Controllers.ExternalDiagramEditor').getView('Common.Views.ExternalDiagramEditor'); + if (diagramEditor && chart) { + diagramEditor.setEditMode(true); + diagramEditor.show(); + diagramEditor.setChartData(new Asc.asc_CChartBinary(chart)); + } + } + }; + + dh.editChartClick = function(){ + if (!Common.Controllers.LaunchController.isScriptLoaded()) return; + var diagramEditor = this.getApplication().getController('Common.Controllers.ExternalDiagramEditor').getView('Common.Views.ExternalDiagramEditor'); + if (diagramEditor) { + diagramEditor.setEditMode(true); + diagramEditor.show(); + var chart = this.api.asc_getChartObject(); + if (chart) { + diagramEditor.setChartData(new Asc.asc_CChartBinary(chart)); + } + } + }; + } }); \ No newline at end of file diff --git a/apps/pdfeditor/main/app/controller/InsTab.js b/apps/pdfeditor/main/app/controller/InsTab.js index 68c800862e..de79eb8537 100644 --- a/apps/pdfeditor/main/app/controller/InsTab.js +++ b/apps/pdfeditor/main/app/controller/InsTab.js @@ -662,7 +662,7 @@ define([ this.api.asc_createSmartArt(value); } }, -/* + onSelectChart: function(type) { var me = this, chart = false; @@ -692,16 +692,18 @@ define([ if (this.diagramEditor && me.api) { this.diagramEditor.setEditMode(false); this.diagramEditor.show(); - + console.log(type) chart = me.api.asc_getChartObject(type); if (chart) { this.diagramEditor.setChartData(new Asc.asc_CChartBinary(chart)); } + // me.api.asc_addChartDrawingObject(type); + // me.api.asc_editChartInFrameEditor(); me.view.fireEvent('insertchart', me.view); } } }, -*/ + onTextLanguage: function(langId) { this._state.lang = langId; }, @@ -950,10 +952,10 @@ define([ } } - // if (in_chart !== this._state.in_chart) { - // this.view.btnInsertChart.updateHint(in_chart ? this.view.tipChangeChart : this.view.tipInsertChart); - // this._state.in_chart = in_chart; - // } + if (in_chart !== this._state.in_chart) { + this.view.btnInsertChart.updateHint(in_chart ? this.view.tipChangeChart : this.view.tipInsertChart); + this._state.in_chart = in_chart; + } if (this._state.prcontrolsdisable !== paragraph_locked) { if (this._state.activated) this._state.prcontrolsdisable = paragraph_locked; diff --git a/apps/pdfeditor/main/app/template/RightMenu.template b/apps/pdfeditor/main/app/template/RightMenu.template index 8c9c6334a1..3db9779d54 100644 --- a/apps/pdfeditor/main/app/template/RightMenu.template +++ b/apps/pdfeditor/main/app/template/RightMenu.template @@ -5,8 +5,7 @@
- - +
@@ -19,7 +18,7 @@ - + diff --git a/apps/pdfeditor/main/app/view/ChartSettings.js b/apps/pdfeditor/main/app/view/ChartSettings.js index e7e0ba36d5..89ee239ace 100644 --- a/apps/pdfeditor/main/app/view/ChartSettings.js +++ b/apps/pdfeditor/main/app/view/ChartSettings.js @@ -43,7 +43,7 @@ define([ 'backbone', 'common/main/lib/component/Button', 'common/main/lib/component/ComboDataView', - // 'pdfeditor/main/app/view/ChartSettingsAdvanced' + 'pdfeditor/main/app/view/ChartSettingsAdvanced' ], function (menuTemplate, $, _, Backbone) { 'use strict'; diff --git a/apps/pdfeditor/main/app/view/ChartSettingsAdvanced.js b/apps/pdfeditor/main/app/view/ChartSettingsAdvanced.js new file mode 100644 index 0000000000..a16e216ba4 --- /dev/null +++ b/apps/pdfeditor/main/app/view/ChartSettingsAdvanced.js @@ -0,0 +1,1518 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2024 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +/** + * ChartSettingsAdvanced.js + * + * Created on 8/18/25 + * + */ + +define([ + 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.template', + 'text!common/main/lib/template/ChartVertAxis.template', + 'text!common/main/lib/template/ChartHorAxis.template', + 'common/main/lib/view/AdvancedSettingsWindow' +], function (contentTemplate, vertTemplate, horTemplate) { + 'use strict'; + + PDFE.Views.ChartSettingsAdvanced = Common.Views.AdvancedSettingsWindow.extend(_.extend({ + options: { + contentWidth: 340, + contentHeight: 450, + toggleGroup: 'chart-adv-settings-group', + properties: null, + chartSettings: null, + storageName: 'pe-chart-settings-adv-category', + sizeMax: {width: 55.88, height: 55.88}, + }, + + initialize : function(options) { + _.extend(this.options, { + title: this.textTitle, + items: [ + {panelId: 'id-adv-chart-general', panelCaption: this.textGeneral}, + {panelId: 'id-chart-settings-dlg-layout', panelCaption: this.textLayout}, + {panelId: 'id-chart-settings-dlg-vert', panelCaption: this.textVertAxis}, + {panelId: 'id-chart-settings-dlg-vert-sec', panelCaption: this.textVertAxisSec}, + {panelId: 'id-chart-settings-dlg-hor', panelCaption: this.textHorAxis}, + {panelId: 'id-chart-settings-dlg-hor-sec', panelCaption: this.textHorAxisSec}, + {panelId: 'id-adv-chart-placement', panelCaption: this.textPlacement}, + {panelId: 'id-adv-chart-alttext', panelCaption: this.textAlt} + ], + contentTemplate: _.template(contentTemplate)({ + scope: this + }) + }, options); + Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); + + this.spinners = []; + + this.currentChartType = Asc.c_oAscChartTypeSettings.barNormal; + this.chartSettings = this.options.chartSettings; + this.vertAxisProps = []; + this.vertAxisPropsIndexes = []; + this.horAxisProps = []; + this.horAxisPropsIndexes = []; + this.currentAxisProps = []; + + this.api = this.options.api; + this._originalProps = this.options.chartProps; + this.slideSize = this.options.slideSize; + this._changedProps = null; + }, + + render: function() { + Common.Views.AdvancedSettingsWindow.prototype.render.call(this); + + var me = this; + + // General + + this.inputChartName = new Common.UI.InputField({ + el : $('#chart-advanced-name'), + allowBlank : true, + validateOnBlur: false, + style : 'width: 100%;' + }).on('changed:after', function() { + me.isChartNameChanged = true; + }); + + // Placement + + this.spnWidth = new Common.UI.MetricSpinner({ + el: $('#chart-advanced-spin-width'), + step: .1, + width: 85, + defaultUnit : "cm", + value: '3 cm', + maxValue: 55.88, + minValue: 0 + }); + this.spnWidth.on('change', _.bind(function(field){ + if (this.btnRatio.pressed) { + var w = field.getNumberValue(); + var h = w/this._nRatio; + if (h>this.sizeMax.height) { + h = this.sizeMax.height; + w = h * this._nRatio; + this.spnWidth.setValue(w, true); + } + this.spnHeight.setValue(h, true); + } + if (this._changedProps) { + this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue())); + } + }, this)); + this.spinners.push(this.spnWidth); + + this.spnHeight = new Common.UI.MetricSpinner({ + el: $('#chart-advanced-spin-height'), + step: .1, + width: 85, + defaultUnit : "cm", + value: '3 cm', + maxValue: 55.88, + minValue: 0 + }); + this.spnHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var h = field.getNumberValue(), w = null; + if (this.btnRatio.pressed) { + w = h * this._nRatio; + if (w>this.sizeMax.width) { + w = this.sizeMax.width; + h = w/this._nRatio; + this.spnHeight.setValue(h, true); + } + this.spnWidth.setValue(w, true); + } + if (this._changedProps) { + this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); + } + }, this)); + this.spinners.push(this.spnHeight); + + this.btnRatio = new Common.UI.Button({ + parentEl: $('#chart-advanced-button-ratio'), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-advanced-ratio', + style: 'margin-bottom: 1px;', + enableToggle: true, + hint: this.textKeepRatio + }); + this.btnRatio.on('click', _.bind(function(btn, e) { + if (btn.pressed && this.spnHeight.getNumberValue()>0) { + this._nRatio = this.spnWidth.getNumberValue()/this.spnHeight.getNumberValue(); + } + if (this._changedProps) { + this._changedProps.asc_putLockAspect(btn.pressed); + } + }, this)); + + this.spnX = new Common.UI.MetricSpinner({ + el: $('#chart-advanced-spin-x'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 55.87, + minValue: -55.87 + }); + this.spinners.push(this.spnX); + + this.spnY = new Common.UI.MetricSpinner({ + el: $('#chart-advanced-spin-y'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 55.87, + minValue: -55.87 + }); + this.spinners.push(this.spnY); + + this.cmbFromX = new Common.UI.ComboBox({ + el: $('#chart-advanced-combo-from-x'), + cls: 'input-group-nr', + style: "width: 125px;", + menuStyle: 'min-width: 125px;', + data: [ + { value: 'left', displayValue: this.textTopLeftCorner }, + { value: 'center', displayValue: this.textCenter } + ], + editable: false, + takeFocusOnClose: true + }); + + this.cmbFromY = new Common.UI.ComboBox({ + el: $('#chart-advanced-combo-from-y'), + cls: 'input-group-nr', + style: "width: 125px;", + menuStyle: 'min-width: 125px;', + data: [ + { value: 'left', displayValue: this.textTopLeftCorner }, + { value: 'center', displayValue: this.textCenter } + ], + editable: false, + takeFocusOnClose: true + }); + + // Alt Text + + this.inputAltTitle = new Common.UI.InputField({ + el : $('#chart-advanced-alt-title'), + allowBlank : true, + validateOnBlur: false, + style : 'width: 100%;' + }).on('changed:after', function() { + me.isAltTitleChanged = true; + }); + + this.textareaAltDescription = this.$window.find('textarea'); + this.textareaAltDescription.keydown(function (event) { + if (event.keyCode == Common.UI.Keys.RETURN) { + event.stopPropagation(); + } + me.isAltDescChanged = true; + }); + + // Chart + this.cmbChartTitle = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-chart-title'), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: [ + {value: Asc.c_oAscChartTitleShowSettings.none, displayValue: this.textNone}, + {value: Asc.c_oAscChartTitleShowSettings.overlay, displayValue: this.textOverlay}, + {value: Asc.c_oAscChartTitleShowSettings.noOverlay, displayValue: this.textNoOverlay} + ], + takeFocusOnClose: true + }); + + this.cmbLegendPos = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-legend-pos'), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: [ + {value: Asc.c_oAscChartLegendShowSettings.none, displayValue: this.textNone}, + {value: Asc.c_oAscChartLegendShowSettings.bottom, displayValue: this.textLegendBottom}, + {value: Asc.c_oAscChartLegendShowSettings.top, displayValue: this.textLegendTop}, + {value: Asc.c_oAscChartLegendShowSettings.right, displayValue: this.textLegendRight}, + {value: Asc.c_oAscChartLegendShowSettings.left, displayValue: this.textLegendLeft}, + {value: Asc.c_oAscChartLegendShowSettings.leftOverlay, displayValue: this.textLeftOverlay}, + {value: Asc.c_oAscChartLegendShowSettings.rightOverlay, displayValue: this.textRightOverlay} + ], + takeFocusOnClose: true + }); + + this.cmbDataLabels = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-data-labels'), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: [ + {value: Asc.c_oAscChartDataLabelsPos.none, displayValue: this.textNone}, + {value: Asc.c_oAscChartDataLabelsPos.ctr, displayValue: this.textCenter}, + {value: Asc.c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom}, + {value: Asc.c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop}, + {value: Asc.c_oAscChartDataLabelsPos.outEnd, displayValue: this.textOuterTop} + ], + takeFocusOnClose: true + }); + + this.cmbDataLabels.on('selected', _.bind(me.onSelectDataLabels, this)); + + this.txtSeparator = new Common.UI.InputField({ + el: $('#chart-dlg-txt-separator'), + name: 'range', + style: 'width: 100%;', + allowBlank: true, + blankError: this.txtEmpty + }); + + this.chSeriesName = new Common.UI.CheckBox({ + el: $('#chart-dlg-check-series'), + labelText: this.textSeriesName + }); + + this.chCategoryName = new Common.UI.CheckBox({ + el: $('#chart-dlg-check-category'), + labelText: this.textCategoryName + }); + + this.chValue = new Common.UI.CheckBox({ + el: $('#chart-dlg-check-value'), + labelText: this.textValue + }); + + this.cmbLines = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-lines'), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: [ + {value: 0, displayValue: this.textNone}, + {value: 1, displayValue: this.textStraight}, + {value: 2, displayValue: this.textSmooth} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (this.chartSettings) { + this.chartSettings.putLine(record.value !== 0); + if (record.value > 0) + this.chartSettings.putSmooth(record.value == 2); + } + }, this)); + + this.chMarkers = new Common.UI.CheckBox({ + el: $('#chart-dlg-check-markers'), + labelText: this.textMarkers + }).on('change', _.bind(function (checkbox, state) { + if (this.chartSettings) + this.chartSettings.putShowMarker(state == 'checked'); + }, this)); + + this.lblLines = $('#chart-dlg-label-lines'); + + // Vertical Axis + this.cmbMinType = []; + this.spnMinValue = []; + this.cmbMaxType = []; + this.spnMaxValue = []; + this.cmbVCrossType = []; + this.spnVAxisCrosses = []; + this.cmbUnits = []; + this.chVReverse = []; + this.cmbVMajorType = []; + this.cmbVMinorType = []; + this.cmbVLabelPos = []; + this.cmbVertTitle = []; + this.cmbVertGrid = []; + this.chVertHide = []; + this.btnVFormat = []; + this.chVLogScale = []; + this.spnBase = []; + + this._arrVertTitle = [ + {value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: me.textNone}, + {value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: me.textRotated}, + {value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: me.textHorizontal} + ]; + + // Horizontal Axis + this.cmbHCrossType = []; + this.cmbAxisPos = []; + this.spnHAxisCrosses = []; + this.chHReverse = []; + this.cmbHMajorType = []; + this.cmbHMinorType = []; + this.spnMarksInterval = []; + this.cmbHLabelPos = []; + this.spnLabelDist = []; + this.cmbLabelInterval = []; + this.spnLabelInterval = []; + this.cmbHorTitle = []; + this.cmbHorGrid = []; + this.chHorHide = []; + this.btnHFormat = []; + + this._arrHorTitle = [ + {value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: me.textNone}, + {value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: me.textNoOverlay} + ]; + + this.afterRender(); + }, + + afterRender: function() { + this.updateMetricUnit(); + this._setDefaults(this._originalProps); + if (this.storageName) { + var value = Common.localStorage.getItem(this.storageName); + this.setActiveCategory((value!==null) ? parseInt(value) : 0); + value = this.getActiveCategory(); + if (value==2 || value==3) this.onVCategoryClick(value-2); + else if (value==4 || value==5) this.onHCategoryClick(value-4); + } + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 0: + me.inputChartName.focus(); + break; + case 1: + me.cmbChartTitle.focus(); + break; + case 2: + case 3: + index -= 2; + var ctrlIndex = me.vertAxisPropsIndexes[index]; + me.onVCategoryClick(index); + (me.vertAxisProps[index].getAxisType()===Asc.c_oAscAxisType.val) ? me.cmbMinType[ctrlIndex].focus() : (me.cmbHCrossType[ctrlIndex].isDisabled() ? me.btnHFormat[ctrlIndex].focus() : me.cmbHCrossType[ctrlIndex].focus() ); + break; + case 4: + case 5: + index -= 4; + var ctrlIndex = me.horAxisPropsIndexes[index]; + me.onHCategoryClick(index); + (me.horAxisProps[index].getAxisType()===Asc.c_oAscAxisType.val) ? me.cmbMinType[ctrlIndex].focus() : (me.cmbHCrossType[ctrlIndex].isDisabled() ? me.btnHFormat[ctrlIndex].focus() : me.cmbHCrossType[ctrlIndex].focus()); + break; + case 6: + me.spnWidth.focus(); + break; + case 7: + me.inputAltTitle.focus(); + break; + } + }, 10); + }, + + _setDefaults: function(props) { + Common.UI.FocusManager.add(this, this.btnsCategory); + if (props ){ + var value = props.asc_getName(); + this.inputChartName.setValue(value ? value : ''); + + this.spnWidth.setMaxValue(this.sizeMax.width); + this.spnHeight.setMaxValue(this.sizeMax.height); + + this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true); + this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getHeight()).toFixed(2), true); + + if (props.asc_getHeight()>0) + this._nRatio = props.asc_getWidth()/props.asc_getHeight(); + + value = props.asc_getLockAspect(); + this.btnRatio.toggle(value); + + this.cmbFromX.setValue('left'); + this.cmbFromY.setValue('left'); + + if (props.asc_getPosition()) { + var Position = {X: props.asc_getPosition().get_X(), Y: props.asc_getPosition().get_Y()}; + this.spnX.setValue((Position.X !== null && Position.X !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.X) : '', true); + this.spnY.setValue((Position.Y !== null && Position.Y !== undefined) ? Common.Utils.Metric.fnRecalcFromMM(Position.Y) : '', true); + } else { + this.spnX.setValue('', true); + this.spnY.setValue('', true); + } + + value = props.asc_getTitle(); + this.inputAltTitle.setValue(value ? value : ''); + + value = props.asc_getDescription(); + this.textareaAltDescription.val(value ? value : ''); + + Common.UI.FocusManager.add(this, [this.inputChartName]); // 0 tab + + this._setChartDefaults(this.chartSettings); + + this._changedProps = new Asc.CAscChartProp(); + + Common.UI.FocusManager.add(this, [this.spnWidth, this.btnRatio, this.spnHeight, this.spnX, this.cmbFromX, this.spnY, this.cmbFromY, // 6 tab + this.inputAltTitle, this.textareaAltDescription ]); // 7 tab + } + Common.UI.FocusManager.add(this, this.getFooterButtons()); + }, + + getSettings: function() { + var Position = new Asc.CPosition(); + if (this.isChartNameChanged) + this._changedProps.asc_putName(this.inputChartName.getValue()); + + if (this.spnX.getValue() !== '') { + var x = Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue()); + if (this.cmbFromX.getValue() === 'center') { + x = (this.slideSize.width/36000)/2 + x; + } + Position.put_X(x); + } + if (this.spnY.getValue() !== '') { + var y = Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue()); + if (this.cmbFromY.getValue() === 'center') { + y = (this.slideSize.height/36000)/2 + y; + } + Position.put_Y(y); + } + this._changedProps.asc_putPosition(Position); + + if (this.isAltTitleChanged) + this._changedProps.asc_putTitle(this.inputAltTitle.getValue()); + + if (this.isAltDescChanged) + this._changedProps.asc_putDescription(this.textareaAltDescription.val()); + + var type = this.currentChartType; + this.chartSettings.putType(type); + + this.chartSettings.putTitle(this.cmbChartTitle.getValue()); + this.chartSettings.putLegendPos(this.cmbLegendPos.getValue()); + + this.chartSettings.putDataLabelsPos(this.cmbDataLabels.getValue()); + + this.chartSettings.putShowSerName(this.chSeriesName.getValue()=='checked'); + this.chartSettings.putShowCatName(this.chCategoryName.getValue()=='checked'); + this.chartSettings.putShowVal(this.chValue.getValue()=='checked'); + + this.chartSettings.putSeparator(_.isEmpty(this.txtSeparator.getValue()) ? ' ' : this.txtSeparator.getValue()); + + this.chMarkers.isVisible() && this.chartSettings.putShowMarker(this.chMarkers.getValue()=='checked'); + + var value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked || + type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.lineNormalMarker || + type == Asc.c_oAscChartTypeSettings.lineStackedMarker || type == Asc.c_oAscChartTypeSettings.lineStackedPerMarker || + type == Asc.c_oAscChartTypeSettings.scatter || type == Asc.c_oAscChartTypeSettings.scatterSmoothMarker || type == Asc.c_oAscChartTypeSettings.scatterSmooth || + type == Asc.c_oAscChartTypeSettings.scatterLineMarker || type == Asc.c_oAscChartTypeSettings.scatterLine); + if (value) { + value = this.cmbLines.getValue(); + this.chartSettings.putLine(value!==0); + if (value>0) + this.chartSettings.putSmooth(value==2); + } + this._changedProps.put_ChartProperties(this.chartSettings); + + return { chartProps: this._changedProps} ; + }, + + _setChartDefaults: function(props) { + if (!props) return; + + this.currentChartType = props.getType(); + + // Layout + + this.cmbChartTitle.setValue(props.getTitle()); + this.cmbLegendPos.setValue(props.getLegendPos()); + + this.updateDataLabels(this.currentChartType, props.getDataLabelsPos()); + this.cmbDataLabels.setDisabled(this.currentChartType==Asc.c_oAscChartTypeSettings.surfaceNormal || + this.currentChartType == Asc.c_oAscChartTypeSettings.surfaceWireframe); + + this.chSeriesName.setValue(this.chartSettings.getShowSerName(), true); + this.chCategoryName.setValue(this.chartSettings.getShowCatName(), true); + this.chValue.setValue(this.chartSettings.getShowVal(), true); + + var value = props.getSeparator(); + this.txtSeparator.setValue((value) ? value : ''); + + Common.UI.FocusManager.add(this, [this.cmbChartTitle, this.cmbLegendPos, this.cmbDataLabels, this.chSeriesName, this.chCategoryName, this.chValue, this.txtSeparator, this.cmbLines, this.chMarkers]); + + // Vertical Axis + this.vertAxisProps = props.getVertAxesProps(); + if (this.vertAxisProps.length>0) { + var el = this.$window.find('#id-chart-settings-dlg-vert'); + this.vertAxisPropsIndexes[0] = (this.vertAxisProps[0].getAxisType()===Asc.c_oAscAxisType.val) ? this.addControlsV(el) : this.addControlsH(el); + } + if (this.vertAxisProps.length>1) { + var el = this.$window.find('#id-chart-settings-dlg-vert-sec'); + this.vertAxisPropsIndexes[1] = (this.vertAxisProps[1].getAxisType()===Asc.c_oAscAxisType.val) ? this.addControlsV(el) : this.addControlsH(el); + } + + // Horizontal Axis + this.horAxisProps = props.getHorAxesProps(); + if (this.horAxisProps.length>0) { + var el = this.$window.find('#id-chart-settings-dlg-hor'); + this.horAxisPropsIndexes[0] = (this.horAxisProps[0].getAxisType()===Asc.c_oAscAxisType.val) ? this.addControlsV(el) : this.addControlsH(el); + } + if (this.horAxisProps.length>1) { + var el = this.$window.find('#id-chart-settings-dlg-hor-sec'); + this.horAxisPropsIndexes[1] = (this.horAxisProps[1].getAxisType()===Asc.c_oAscAxisType.val) ? this.addControlsV(el) : this.addControlsH(el); + } + this.updateAxisProps(this.currentChartType); + }, + + addControlsV: function(parentEl) { + var me = this, + i = me.chVertHide.length, + el = $(_.template(vertTemplate)({ + scope: me, + idx: i + })); + parentEl.append(el); + + me.chVertHide[i] = new Common.UI.CheckBox({ + el: $('#chart-dlg-chk-vert-hide-' + i), + labelText: me.textHideAxis + }).on('change', _.bind(function (checkbox, state) { + if (me.currentAxisProps[i]) + me.currentAxisProps[i].putShow(state !== 'checked'); + }, me)); + Common.UI.FocusManager.add(this, me.chVertHide[i]); + + me.cmbVertTitle[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-vert-title-' + i), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: me._arrVertTitle, + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) + me.currentAxisProps[i].putLabel(record.value); + }, me)); + Common.UI.FocusManager.add(this, me.cmbVertTitle[i]); + + me.cmbVertGrid[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-vert-grid-' + i), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: [ + {value: Asc.c_oAscGridLinesSettings.none, displayValue: me.textNone}, + {value: Asc.c_oAscGridLinesSettings.major, displayValue: me.textMajor}, + {value: Asc.c_oAscGridLinesSettings.minor, displayValue: me.textMinor}, + {value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: me.textMajorMinor} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) + me.currentAxisProps[i].putGridlines(record.value); + }, me)); + Common.UI.FocusManager.add(this, me.cmbVertGrid[i]); + + me.cmbMinType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-mintype-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textAuto, value: Asc.c_oAscValAxisRule.auto}, + {displayValue: me.textFixed, value: Asc.c_oAscValAxisRule.fixed} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMinValRule(record.value); + if (record.value == Asc.c_oAscValAxisRule.auto) { + me.spnMinValue[i].setValue(me._originalAxisVValues[i].minAuto, true); + } + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbMinType[i]); + + me.spnMinValue[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-min-value-' + i), + maxValue: 1000000, + minValue: -1000000, + step: 0.1, + defaultUnit: "", + defaultValue: 0, + value: '' + }).on('change', _.bind(function (field, newValue, oldValue) { + me.cmbMinType[i].suspendEvents(); + me.cmbMinType[i].setValue(Asc.c_oAscValAxisRule.fixed); + me.cmbMinType[i].resumeEvents(); + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMinValRule(Asc.c_oAscValAxisRule.fixed); + me.currentAxisProps[i].putMinVal(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnMinValue[i]); + + me.cmbMaxType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-maxtype-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textAuto, value: Asc.c_oAscValAxisRule.auto}, + {displayValue: me.textFixed, value: Asc.c_oAscValAxisRule.fixed} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMaxValRule(record.value); + if (record.value == Asc.c_oAscValAxisRule.auto) { + me.spnMaxValue[i].setValue(me._originalAxisVValues[i].maxAuto, true); + } + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbMaxType[i]); + + me.spnMaxValue[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-max-value-' + i), + maxValue: 1000000, + minValue: -1000000, + step: 0.1, + defaultUnit: "", + defaultValue: 0, + value: '' + }).on('change', _.bind(function (field, newValue, oldValue) { + me.cmbMaxType[i].suspendEvents(); + me.cmbMaxType[i].setValue(Asc.c_oAscValAxisRule.fixed); + me.cmbMaxType[i].resumeEvents(); + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMaxValRule(Asc.c_oAscValAxisRule.fixed); + me.currentAxisProps[i].putMaxVal(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnMaxValue[i]); + + me.cmbVCrossType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-v-crosstype-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textAuto, value: Asc.c_oAscCrossesRule.auto}, + {displayValue: me.textValue, value: Asc.c_oAscCrossesRule.value}, + {displayValue: me.textMinValue, value: Asc.c_oAscCrossesRule.minValue}, + {displayValue: me.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putCrossesRule(record.value); + var value; + switch (record.value) { + case Asc.c_oAscCrossesRule.minValue: + me.spnVAxisCrosses[i].setValue(me.spnMinValue[i].getNumberValue(), true); + break; + case Asc.c_oAscCrossesRule.maxValue: + me.spnVAxisCrosses[i].setValue(me.spnMaxValue[i].getNumberValue(), true); + break; + case Asc.c_oAscCrossesRule.auto: + me.spnVAxisCrosses[i].setValue(me._originalAxisVValues[i].crossesAuto, true); + break; + } + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbVCrossType[i]); + + me.spnVAxisCrosses[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-v-axis-crosses-' + i), + maxValue: 1000000, + minValue: -1000000, + step: 0.1, + defaultUnit: "", + defaultValue: 0, + value: '' + }).on('change', _.bind(function (field, newValue, oldValue) { + me.cmbVCrossType[i].suspendEvents(); + me.cmbVCrossType[i].setValue(Asc.c_oAscCrossesRule.value); + me.cmbVCrossType[i].resumeEvents(); + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putCrossesRule(Asc.c_oAscCrossesRule.value); + me.currentAxisProps[i].putCrosses(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnVAxisCrosses[i]); + + me.cmbUnits[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-units-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textNone, value: Asc.c_oAscValAxUnits.none}, + {displayValue: me.textHundreds, value: Asc.c_oAscValAxUnits.HUNDREDS}, + {displayValue: me.textThousands, value: Asc.c_oAscValAxUnits.THOUSANDS}, + {displayValue: me.textTenThousands, value: Asc.c_oAscValAxUnits.TEN_THOUSANDS}, + {displayValue: me.textHundredThousands, value: Asc.c_oAscValAxUnits.HUNDRED_THOUSANDS}, + {displayValue: me.textMillions, value: Asc.c_oAscValAxUnits.MILLIONS}, + {displayValue: me.textTenMillions, value: Asc.c_oAscValAxUnits.TEN_MILLIONS}, + {displayValue: me.textHundredMil, value: Asc.c_oAscValAxUnits.HUNDRED_MILLIONS}, + {displayValue: me.textBillions, value: Asc.c_oAscValAxUnits.BILLIONS}, + {displayValue: me.textTrillions, value: Asc.c_oAscValAxUnits.TRILLIONS} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putDispUnitsRule(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbUnits[i]); + + me.chVReverse[i] = new Common.UI.CheckBox({ + el: $('#chart-dlg-check-v-reverse-' + i), + labelText: me.textReverse + }).on('change', _.bind(function (checkbox, state) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putInvertValOrder(state == 'checked'); + } + }, me)); + Common.UI.FocusManager.add(this, me.chVReverse[i]); + + me.cmbVMajorType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-v-major-type-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE}, + {displayValue: me.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, + {displayValue: me.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, + {displayValue: me.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMajorTickMark(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbVMajorType[i]); + + me.cmbVMinorType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-v-minor-type-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE}, + {displayValue: me.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, + {displayValue: me.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, + {displayValue: me.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMinorTickMark(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbVMinorType[i]); + + me.cmbVLabelPos[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-v-label-pos-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textNone, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE}, + {displayValue: me.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW}, + {displayValue: me.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH}, + {displayValue: me.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putTickLabelsPos(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbVLabelPos[i]); + + me.btnVFormat[i] = new Common.UI.Button({ + el: $('#chart-dlg-btn-v-format-' + i) + }).on('click', _.bind(me.openFormat, me, i)); + Common.UI.FocusManager.add(this, me.btnVFormat[i]); + + me.chVLogScale[i] = new Common.UI.CheckBox({ + el: $('#chart-dlg-check-v-logscale-' + i), + labelText: me.textLogScale + }).on('change', _.bind(function (checkbox, state) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putLogScale(state == 'checked'); + (state == 'checked') && me.currentAxisProps[i].putLogBase(me.spnBase[i].getNumberValue()); + } + me.spnBase[i].setDisabled((state !== 'checked')); + }, me)); + Common.UI.FocusManager.add(this, me.chVLogScale[i]); + + me.spnBase[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-base-' + i), + maxValue: 1000, + minValue: 2, + step: 1, + defaultUnit: "", + value: 10 + }).on('change', _.bind(function (field, newValue, oldValue) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putLogBase(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnBase[i]); + + return i; + }, + + addControlsH: function(parentEl) { + var me = this, + i = me.chHorHide.length, + el = $(_.template(horTemplate)({ + scope: me, + idx: i + })); + parentEl.append(el); + + me.chHorHide[i] = new Common.UI.CheckBox({ + el: $('#chart-dlg-chk-hor-hide-' + i), + labelText: me.textHideAxis + }).on('change', _.bind(function (checkbox, state) { + if (me.currentAxisProps[i]) + me.currentAxisProps[i].putShow(state !== 'checked'); + }, me)); + Common.UI.FocusManager.add(this, me.chHorHide[i]); + + me.cmbHorTitle[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-hor-title-' + i), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: me._arrHorTitle, + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) + me.currentAxisProps[i].putLabel(record.value); + }, me)); + Common.UI.FocusManager.add(this, me.cmbHorTitle[i]); + + me.cmbHorGrid[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-hor-grid-' + i), + menuStyle: 'min-width: 100%;', + editable: false, + cls: 'input-group-nr', + data: [ + {value: Asc.c_oAscGridLinesSettings.none, displayValue: me.textNone}, + {value: Asc.c_oAscGridLinesSettings.major, displayValue: me.textMajor}, + {value: Asc.c_oAscGridLinesSettings.minor, displayValue: me.textMinor}, + {value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: me.textMajorMinor} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) + me.currentAxisProps[i].putGridlines(record.value); + }, me)); + Common.UI.FocusManager.add(this, me.cmbHorGrid[i]); + + me.cmbHCrossType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-h-crosstype-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textAuto, value: Asc.c_oAscCrossesRule.auto}, + {displayValue: me.textValue, value: Asc.c_oAscCrossesRule.value}, + {displayValue: me.textMinValue, value: Asc.c_oAscCrossesRule.minValue}, + {displayValue: me.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putCrossesRule(record.value); + if (record.value == Asc.c_oAscCrossesRule.auto) { + me.spnHAxisCrosses[i].setValue(me._originalAxisHValues[i].crossesAuto, true); + } else if (record.value == Asc.c_oAscCrossesRule.minValue) { + me.spnHAxisCrosses[i].setValue(me._originalAxisHValues[i].minAuto, true); + } else if (record.value == Asc.c_oAscCrossesRule.maxValue) { + me.spnHAxisCrosses[i].setValue(me._originalAxisHValues[i].maxAuto, true); + } + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbHCrossType[i]); + + me.spnHAxisCrosses[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-h-axis-crosses-' + i), + maxValue: 1000000, + minValue: -1000000, + step: 0.1, + defaultUnit: "", + defaultValue: 0, + value: '' + }).on('change', _.bind(function (field, newValue, oldValue) { + me.cmbHCrossType[i].suspendEvents(); + me.cmbHCrossType[i].setValue(Asc.c_oAscCrossesRule.value); + me.cmbHCrossType[i].resumeEvents(); + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putCrossesRule(Asc.c_oAscCrossesRule.value); + me.currentAxisProps[i].putCrosses(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnHAxisCrosses[i]); + + me.cmbAxisPos[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-axis-pos-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textOnTickMarks, value: Asc.c_oAscLabelsPosition.byDivisions}, + {displayValue: me.textBetweenTickMarks, value: Asc.c_oAscLabelsPosition.betweenDivisions} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putLabelsPosition(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbAxisPos[i]); + + me.chHReverse[i] = new Common.UI.CheckBox({ + el: $('#chart-dlg-check-h-reverse-' + i), + labelText: me.textReverse + }).on('change', _.bind(function (checkbox, state) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putInvertCatOrder(state == 'checked'); + } + }, me)); + Common.UI.FocusManager.add(this, me.chHReverse[i]); + + me.cmbHMajorType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-h-major-type-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE}, + {displayValue: me.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, + {displayValue: me.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, + {displayValue: me.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMajorTickMark(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbHMajorType[i]); + + me.cmbHMinorType[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-h-minor-type-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE}, + {displayValue: me.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, + {displayValue: me.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, + {displayValue: me.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putMinorTickMark(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbHMinorType[i]); + + me.spnMarksInterval[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-marks-interval-' + i), + width: 'auto', + maxValue: 1000000, + minValue: 1, + step: 1, + defaultUnit: "", + value: '' + }).on('change', _.bind(function (field, newValue, oldValue) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putIntervalBetweenTick(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnMarksInterval[i]); + + me.cmbHLabelPos[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-h-label-pos-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textNone, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE}, + {displayValue: me.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW}, + {displayValue: me.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH}, + {displayValue: me.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putTickLabelsPos(record.value); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbHLabelPos[i]); + + me.spnLabelDist[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-label-dist-' + i), + width: 'auto', + maxValue: 1000, + minValue: 0, + step: 1, + defaultUnit: "", + value: '' + }).on('change', _.bind(function (field, newValue, oldValue) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putLabelsAxisDistance(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnLabelDist[i]); + + me.spnLabelInterval[i] = new Common.UI.MetricSpinner({ + el: $('#chart-dlg-input-label-int-' + i), + width: 60, + maxValue: 1000000, + minValue: 1, + step: 1, + defaultUnit: "", + value: '' + }).on('change', _.bind(function (field, newValue, oldValue) { + me.cmbLabelInterval[i].suspendEvents(); + me.cmbLabelInterval[i].setValue(Asc.c_oAscBetweenLabelsRule.manual); + me.cmbLabelInterval[i].resumeEvents(); + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putIntervalBetweenLabelsRule(Asc.c_oAscBetweenLabelsRule.manual); + me.currentAxisProps[i].putIntervalBetweenLabels(field.getNumberValue()); + } + }, me)); + Common.UI.FocusManager.add(this, me.spnLabelInterval[i]); + + me.cmbLabelInterval[i] = new Common.UI.ComboBox({ + el: $('#chart-dlg-combo-label-int-' + i), + cls: 'input-group-nr', + menuStyle: 'min-width: 100%;', + editable: false, + data: [ + {displayValue: me.textAuto, value: Asc.c_oAscBetweenLabelsRule.auto}, + {displayValue: me.textManual, value: Asc.c_oAscBetweenLabelsRule.manual} + ], + takeFocusOnClose: true + }).on('selected', _.bind(function (combo, record) { + if (me.currentAxisProps[i]) { + me.currentAxisProps[i].putIntervalBetweenLabelsRule(record.value); + if (record.value == Asc.c_oAscBetweenLabelsRule.auto) + me.spnLabelInterval[i].setValue(1, true); + } + }, me)); + Common.UI.FocusManager.add(this, me.cmbLabelInterval[i]); + + me.btnHFormat[i] = new Common.UI.Button({ + el: $('#chart-dlg-btn-h-format-' + i) + }).on('click', _.bind(me.openFormat, me, i)); + Common.UI.FocusManager.add(this, me.btnHFormat[i]); + + return i; + }, + + updateAxisProps: function(type, isDefault) { + var value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked || + type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.lineNormalMarker || + type == Asc.c_oAscChartTypeSettings.lineStackedMarker || type == Asc.c_oAscChartTypeSettings.lineStackedPerMarker || + type == Asc.c_oAscChartTypeSettings.scatter || type == Asc.c_oAscChartTypeSettings.scatterSmoothMarker || type == Asc.c_oAscChartTypeSettings.scatterSmooth || + type == Asc.c_oAscChartTypeSettings.scatterLineMarker || type == Asc.c_oAscChartTypeSettings.scatterLine); + this.chMarkers.setVisible(value); + this.cmbLines.setVisible(value); + this.lblLines.toggleClass('hidden', !value); + + if (value) { + this.chMarkers.setValue(this.chartSettings.getShowMarker(), true); + this.cmbLines.setValue(this.chartSettings.getLine() ? (this.chartSettings.getSmooth() ? 2 : 1) : 0); + } + + value = (type == Asc.c_oAscChartTypeSettings.pie || type == Asc.c_oAscChartTypeSettings.doughnut || type == Asc.c_oAscChartTypeSettings.pie3d); + this.btnsCategory[2].setDisabled(value); + this.btnsCategory[3].setDisabled(value); + this.btnsCategory[4].setDisabled(value); + this.btnsCategory[5].setDisabled(value); + this.btnsCategory[2].setVisible(this.vertAxisProps.length>0); + this.btnsCategory[3].setVisible(this.vertAxisProps.length>1); + this.btnsCategory[4].setVisible(this.horAxisProps.length>0); + this.btnsCategory[5].setVisible(this.horAxisProps.length>1); + + value = (type == Asc.c_oAscChartTypeSettings.barNormal3d || type == Asc.c_oAscChartTypeSettings.barStacked3d || type == Asc.c_oAscChartTypeSettings.barStackedPer3d || + type == Asc.c_oAscChartTypeSettings.hBarNormal3d || type == Asc.c_oAscChartTypeSettings.hBarStacked3d || type == Asc.c_oAscChartTypeSettings.hBarStackedPer3d || + type == Asc.c_oAscChartTypeSettings.barNormal3dPerspective); + for (var i=0; i' + '' + '' + - // '' + '' + + '' + '' + '' + '
' + @@ -147,7 +147,7 @@ define([ dataHintOffset: 'small' }); me.lockedControls.push(me.btnInsertTable); -/* + me.btnInsertChart = new Common.UI.Button({ id: 'tlbtn-insertchart', cls: 'btn-toolbar x-huge icon-top', @@ -160,7 +160,7 @@ define([ dataHintOffset: 'small' }); me.lockedControls.push(me.btnInsertChart); -*/ + this.btnInsertSmartArt = new Common.UI.Button({ id: 'tlbtn-insertsmartart', cls: 'btn-toolbar x-huge icon-top', @@ -315,7 +315,7 @@ define([ _injectComponent('#slot-btn-inssymbol', this.btnInsertSymbol); _injectComponent('#slot-btn-insertlink', this.btnInsertHyperlink); _injectComponent('#slot-btn-inserttable', this.btnInsertTable); - // _injectComponent('#slot-btn-insertchart', this.btnInsertChart); + _injectComponent('#slot-btn-insertchart', this.btnInsertChart); _injectComponent('#slot-btn-instextart', this.btnInsertTextArt); // _injectComponent('#slot-btn-editheader', this.btnEditHeader); // _injectComponent('#slot-btn-datetime', this.btnInsDateTime); @@ -424,8 +424,8 @@ define([ }); this.btnInsertTable.updateHint(this.tipInsertTable); - // this.btnInsertChart.updateHint(this.tipInsertChart); this.btnInsertSmartArt.updateHint(this.tipInsertSmartArt); + this.btnInsertChart.updateHint(this.tipInsertChart); this.btnInsertEquation.updateHint(this.tipInsertEquation); this.btnInsertSymbol.updateHint(this.tipInsertSymbol); this.btnInsertHyperlink.updateHint(this.tipInsertHyperlink + Common.Utils.String.platformKey('Ctrl+K')); @@ -433,7 +433,6 @@ define([ // this.btnEditHeader.updateHint(this.tipEditHeaderFooter); // this.btnInsDateTime.updateHint(this.tipDateTime); // this.btnInsSlideNum.updateHint(this.tipPageNum); -/* this.btnInsertChart.setMenu( new Common.UI.Menu({ style: 'width: 364px;padding-top: 12px;', items: [ @@ -454,13 +453,15 @@ define([ }); picker.on('item:click', function (picker, item, record, e) { if (record) - me.fireEvent('insert:chart', [record.get('type')]); + {me.fireEvent('insert:chart', [record.get('type')]) + console.log('chart') + }; }); menu.off('show:before', onShowBefore); menu.setInnerMenu([{menu: picker, index: 0}]); }; this.btnInsertChart.menu.on('show:before', onShowBefore); -*/ + this.btnInsertSmartArt.setMenu(new Common.UI.Menu({ cls: 'shifted-right', items: [] diff --git a/apps/pdfeditor/main/app/view/RightMenu.js b/apps/pdfeditor/main/app/view/RightMenu.js index 51b8b25d15..8b701c8905 100644 --- a/apps/pdfeditor/main/app/view/RightMenu.js +++ b/apps/pdfeditor/main/app/view/RightMenu.js @@ -101,15 +101,15 @@ define([ toggleGroup: 'tabpanelbtnsGroup', allowMouseEventsOnDisabled: true }); - // this.btnChart = new Common.UI.Button({ - // hint: this.txtChartSettings, - // asctype: Common.Utils.documentSettingsType.Chart, - // enableToggle: true, - // disabled: true, - // iconCls: 'btn-menu-chart', - // toggleGroup: 'tabpanelbtnsGroup', - // allowMouseEventsOnDisabled: true - // }); + this.btnChart = new Common.UI.Button({ + hint: this.txtChartSettings, + asctype: Common.Utils.documentSettingsType.Chart, + enableToggle: true, + disabled: true, + iconCls: 'btn-menu-chart', + toggleGroup: 'tabpanelbtnsGroup', + allowMouseEventsOnDisabled: true + }); this.btnShape = new Common.UI.Button({ hint: this.txtShapeSettings, asctype: Common.Utils.documentSettingsType.Shape, @@ -135,7 +135,7 @@ define([ this._settings[Common.Utils.documentSettingsType.Table] = {panel: "id-table-settings", btn: this.btnTable}; this._settings[Common.Utils.documentSettingsType.Image] = {panel: "id-image-settings", btn: this.btnImage}; this._settings[Common.Utils.documentSettingsType.Shape] = {panel: "id-shape-settings", btn: this.btnShape}; - // this._settings[Common.Utils.documentSettingsType.Chart] = {panel: "id-chart-settings", btn: this.btnChart}; + this._settings[Common.Utils.documentSettingsType.Chart] = {panel: "id-chart-settings", btn: this.btnChart}; this._settings[Common.Utils.documentSettingsType.TextArt] = {panel: "id-textart-settings", btn: this.btnTextArt}; return this; @@ -171,14 +171,14 @@ define([ this.btnText.setElement($('#id-right-menu-text'), false); this.btnText.render(); this.btnTable.setElement($('#id-right-menu-table'), false); this.btnTable.render(); this.btnImage.setElement($('#id-right-menu-image'), false); this.btnImage.render(); - // this.btnChart.setElement($('#id-right-menu-chart'), false); this.btnChart.render(); + this.btnChart.setElement($('#id-right-menu-chart'), false); this.btnChart.render(); this.btnShape.setElement($('#id-right-menu-shape'), false); this.btnShape.render(); this.btnTextArt.setElement($('#id-right-menu-textart'), false); this.btnTextArt.render(); this.btnText.on('click', _.bind(this.onBtnMenuClick, this)); this.btnTable.on('click', _.bind(this.onBtnMenuClick, this)); this.btnImage.on('click', _.bind(this.onBtnMenuClick, this)); - // this.btnChart.on('click', _.bind(this.onBtnMenuClick, this)); + this.btnChart.on('click', _.bind(this.onBtnMenuClick, this)); this.btnShape.on('click', _.bind(this.onBtnMenuClick, this)); this.btnTextArt.on('click', _.bind(this.onBtnMenuClick, this)); @@ -338,7 +338,7 @@ define([ }, setButtons: function () { - var allButtons = [this.btnShape, this.btnImage, this.btnText, this.btnTable, this.btnTextArt/*, this.btnChart, this.btnSignature*/, this.btnForm]; + var allButtons = [this.btnShape, this.btnImage, this.btnText, this.btnTable, this.btnTextArt, this.btnChart/*, this.btnSignature*/, this.btnForm]; Common.UI.SideMenu.prototype.setButtons.apply(this, [allButtons]); }, diff --git a/apps/pdfeditor/main/app_dev.js b/apps/pdfeditor/main/app_dev.js index 42b754e7cf..7be9bf56d6 100644 --- a/apps/pdfeditor/main/app_dev.js +++ b/apps/pdfeditor/main/app_dev.js @@ -141,7 +141,7 @@ require([ ,'Common.Controllers.Comments' ,'Common.Controllers.Draw' ,'Common.Controllers.Plugins' - // ,'Common.Controllers.ExternalDiagramEditor' + ,'Common.Controllers.ExternalDiagramEditor' // ,'Common.Controllers.ExternalOleEditor' ,'Common.Controllers.Protection' ] @@ -176,7 +176,7 @@ require([ 'common/main/lib/controller/Comments' ,'common/main/lib/controller/Chat' ,'common/main/lib/controller/Plugins' - // ,'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ExternalDiagramEditor' // ,'common/main/lib/controller/ExternalOleEditor' ,'common/main/lib/controller/Draw' ,'common/main/lib/controller/Protection' @@ -195,6 +195,8 @@ require([ 'common/main/lib/view/InsertTableDialog', 'common/main/lib/view/SearchDialog', 'common/main/lib/view/RenameDialog', + 'common/main/lib/view/ExternalEditor', + 'common/main/lib/view/ExternalDiagramEditor', 'common/main/lib/view/PluginDlg', 'common/main/lib/view/PluginPanel', 'common/main/lib/view/ShapeShadowDialog', @@ -215,7 +217,8 @@ require([ 'pdfeditor/main/app/view/HyperlinkSettingsDialog', 'pdfeditor/main/app/view/ShapeSettingsAdvanced', 'pdfeditor/main/app/view/TableSettingsAdvanced', - 'pdfeditor/main/app/view/FormatSettingsDialog' + 'pdfeditor/main/app/view/FormatSettingsDialog', + 'pdfeditor/main/app/view/ChartSettingsAdvanced' ]; window.compareVersions = true; diff --git a/apps/pdfeditor/main/app_pack.js b/apps/pdfeditor/main/app_pack.js index ad75f88ea7..07bae3d5b9 100644 --- a/apps/pdfeditor/main/app_pack.js +++ b/apps/pdfeditor/main/app_pack.js @@ -12,6 +12,8 @@ require([ 'common/main/lib/view/InsertTableDialog', 'common/main/lib/view/SearchDialog', 'common/main/lib/view/RenameDialog', + 'common/main/lib/view/ExternalEditor', + 'common/main/lib/view/ExternalDiagramEditor', 'common/main/lib/view/PluginDlg', 'common/main/lib/view/PluginPanel', 'common/main/lib/view/ShapeShadowDialog', @@ -32,7 +34,8 @@ require([ 'pdfeditor/main/app/view/HyperlinkSettingsDialog', 'pdfeditor/main/app/view/ShapeSettingsAdvanced', 'pdfeditor/main/app/view/TableSettingsAdvanced', - 'pdfeditor/main/app/view/FormatSettingsDialog' + 'pdfeditor/main/app/view/FormatSettingsDialog', + 'pdfeditor/main/app/view/ChartSettingsAdvanced' ], function () { Common.NotificationCenter.trigger('app-pack:loaded'); }); diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index f3c73c97ce..532dc9a947 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -169,6 +169,51 @@ "Common.define.smartArt.textVerticalPictureAccentList": "Vertical picture accent list", "Common.define.smartArt.textVerticalPictureList": "Vertical picture list", "Common.define.smartArt.textVerticalProcess": "Vertical process", + "Common.define.chartData.textArea": "Area", + "Common.define.chartData.textAreaStacked": "Stacked area", + "Common.define.chartData.textAreaStackedPer": "100% Stacked area", + "Common.define.chartData.textBar": "Bar", + "Common.define.chartData.textBarNormal": "Clustered column", + "Common.define.chartData.textBarNormal3d": "3-D Clustered column", + "Common.define.chartData.textBarNormal3dPerspective": "3-D column", + "Common.define.chartData.textBarStacked": "Stacked column", + "Common.define.chartData.textBarStacked3d": "3-D Stacked column", + "Common.define.chartData.textBarStackedPer": "100% Stacked column", + "Common.define.chartData.textBarStackedPer3d": "3-D 100% Stacked column", + "Common.define.chartData.textCharts": "Charts", + "Common.define.chartData.textColumn": "Column", + "Common.define.chartData.textCombo": "Combo", + "Common.define.chartData.textComboAreaBar": "Stacked area - clustered column", + "Common.define.chartData.textComboBarLine": "Clustered column - line", + "Common.define.chartData.textComboBarLineSecondary": "Clustered column - line on secondary axis", + "Common.define.chartData.textComboCustom": "Custom combination", + "Common.define.chartData.textDoughnut": "Doughnut", + "Common.define.chartData.textHBarNormal": "Clustered bar", + "Common.define.chartData.textHBarNormal3d": "3-D Clustered bar", + "Common.define.chartData.textHBarStacked": "Stacked bar", + "Common.define.chartData.textHBarStacked3d": "3-D Stacked bar", + "Common.define.chartData.textHBarStackedPer": "100% Stacked bar", + "Common.define.chartData.textHBarStackedPer3d": "3-D 100% Stacked bar", + "Common.define.chartData.textLine": "Line", + "Common.define.chartData.textLine3d": "3-D line", + "Common.define.chartData.textLineMarker": "Line with markers", + "Common.define.chartData.textLineStacked": "Stacked line", + "Common.define.chartData.textLineStackedMarker": "Stacked line with markers", + "Common.define.chartData.textLineStackedPer": "100% Stacked line", + "Common.define.chartData.textLineStackedPerMarker": "100% Stacked line with markers", + "Common.define.chartData.textPie": "Pie", + "Common.define.chartData.textPie3d": "3-D pie", + "Common.define.chartData.textPoint": "XY (Scatter)", + "Common.define.chartData.textRadar": "Radar", + "Common.define.chartData.textRadarFilled": "Filled radar", + "Common.define.chartData.textRadarMarker": "Radar with markers", + "Common.define.chartData.textScatter": "Scatter", + "Common.define.chartData.textScatterLine": "Scatter with straight lines", + "Common.define.chartData.textScatterLineMarker": "Scatter with straight lines and markers", + "Common.define.chartData.textScatterSmooth": "Scatter with smooth lines", + "Common.define.chartData.textScatterSmoothMarker": "Scatter with smooth lines and markers", + "Common.define.chartData.textStock": "Stock", + "Common.define.chartData.textSurface": "Surface", "Common.Translation.textMoreButton": "More", "Common.Translation.tipFileLocked": "Document is locked for editing. You can make changes and save it as local copy later.", "Common.Translation.tipFileReadOnly": "The file is read-only. To keep your changes, save the file with a new name or in a different location.", @@ -374,6 +419,9 @@ "Common.Views.Draw.txtPen": "Pen", "Common.Views.Draw.txtSelect": "Select", "Common.Views.Draw.txtSize": "Size", + "Common.Views.ExternalDiagramEditor.textTitle": "Chart editor", + "Common.Views.ExternalEditor.textClose": "Close", + "Common.Views.ExternalEditor.textSave": "Save & Exit", "Common.Views.Header.ariaQuickAccessToolbar": "Quick access toolbar", "Common.Views.Header.labelCoUsersDescr": "Users who are editing the file:", "Common.Views.Header.textAddFavorite": "Mark as favorite", @@ -1192,6 +1240,10 @@ "PDFE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.
Contact %1 sales team for personal upgrade terms.", "PDFE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.", "PDFE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "PDFE.Controllers.Main.txtSeries": "Series", + "PDFE.Controllers.Main.txtDiagramTitle": "Chart title", + "PDFE.Controllers.Main.txtXAxis": "X Axis", + "PDFE.Controllers.Main.txtYAxis": "Y Axis", "PDFE.Controllers.Navigation.txtBeginning": "Beginning of document", "PDFE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document", "PDFE.Controllers.Print.textMarginsLast": "Last custom", @@ -1837,6 +1889,7 @@ "PDFE.Views.InsTab.tipDateTime": "Insert current date and time", "PDFE.Views.InsTab.tipEditHeaderFooter": "Edit header or footer", "PDFE.Views.InsTab.tipInsertChart": "Insert chart", + "PDFE.Views.InsTab.tipChangeChart": "Change chart type", "PDFE.Views.InsTab.tipInsertEquation": "Insert equation", "PDFE.Views.InsTab.tipInsertHorizontalText": "Insert horizontal text box", "PDFE.Views.InsTab.tipInsertHyperlink": "Add hyperlink", @@ -2250,6 +2303,127 @@ "PDFE.Views.TextArtSettings.txtWood": "Wood", "PDFE.Views.Toolbar.capBtnArrowComment": "Arrow", "PDFE.Views.Toolbar.capBtnCircleComment": "Circle", + "PDFE.Views.ChartSettings.text3dDepth": "Depth (% of base)", + "PDFE.Views.ChartSettings.text3dHeight": "Height (% of base)", + "PDFE.Views.ChartSettings.text3dRotation": "3D Rotation", + "PDFE.Views.ChartSettings.textAdvanced": "Show advanced settings", + "PDFE.Views.ChartSettings.textAutoscale": "Autoscale", + "PDFE.Views.ChartSettings.textChartType": "Change chart type", + "PDFE.Views.ChartSettings.textData": "Data", + "PDFE.Views.ChartSettings.textDefault": "Default rotation", + "PDFE.Views.ChartSettings.textDown": "Down", + "PDFE.Views.ChartSettings.textEditData": "Edit data", + "PDFE.Views.ChartSettings.textEditLinks": "Edit Links", + "PDFE.Views.ChartSettings.textHeight": "Height", + "PDFE.Views.ChartSettings.textKeepRatio": "Constant proportions", + "PDFE.Views.ChartSettings.textLeft": "Left", + "PDFE.Views.ChartSettings.textLinkedData": "Linked Data", + "PDFE.Views.ChartSettings.textNarrow": "Narrow field of view", + "PDFE.Views.ChartSettings.textPerspective": "Perspective", + "PDFE.Views.ChartSettings.textRight": "Right", + "PDFE.Views.ChartSettings.textRightAngle": "Right angle axes", + "PDFE.Views.ChartSettings.textSelectData": "Select Data", + "PDFE.Views.ChartSettings.textSize": "Size", + "PDFE.Views.ChartSettings.textStyle": "Style", + "PDFE.Views.ChartSettings.textUp": "Up", + "PDFE.Views.ChartSettings.textUpdateData": "Update Data", + "PDFE.Views.ChartSettings.textWiden": "Widen field of view", + "PDFE.Views.ChartSettings.textWidth": "Width", + "PDFE.Views.ChartSettings.textX": "X rotation", + "PDFE.Views.ChartSettings.textY": "Y rotation", + "PDFE.Views.ChartSettingsAdvanced.textAlt": "Alternative text", + "PDFE.Views.ChartSettingsAdvanced.textAltDescription": "Description", + "PDFE.Views.ChartSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, shape, chart, or table.", + "PDFE.Views.ChartSettingsAdvanced.textAltTitle": "Title", + "PDFE.Views.ChartSettingsAdvanced.textAuto": "Auto", + "PDFE.Views.ChartSettingsAdvanced.textAxisCrosses": "Axis Crosses", + "PDFE.Views.ChartSettingsAdvanced.textAxisPos": "Axis Position", + "PDFE.Views.ChartSettingsAdvanced.textAxisTitle": "Title", + "PDFE.Views.ChartSettingsAdvanced.textBase": "Base", + "PDFE.Views.ChartSettingsAdvanced.textBetweenTickMarks": "Between Tick Marks", + "PDFE.Views.ChartSettingsAdvanced.textBillions": "Billions", + "PDFE.Views.ChartSettingsAdvanced.textCategoryName": "Category Name", + "PDFE.Views.ChartSettingsAdvanced.textCenter": "Center", + "PDFE.Views.ChartSettingsAdvanced.textChartName": "Chart name", + "PDFE.Views.ChartSettingsAdvanced.textChartTitle": "Chart Title", + "PDFE.Views.ChartSettingsAdvanced.textCross": "Cross", + "PDFE.Views.ChartSettingsAdvanced.textCustom": "Custom", + "PDFE.Views.ChartSettingsAdvanced.textDataLabels": "Data Labels", + "PDFE.Views.ChartSettingsAdvanced.textFit": "Fit Width", + "PDFE.Views.ChartSettingsAdvanced.textFixed": "Fixed", + "PDFE.Views.ChartSettingsAdvanced.textFormat": "Label format", + "PDFE.Views.ChartSettingsAdvanced.textFrom": "From", + "PDFE.Views.ChartSettingsAdvanced.textGeneral": "General", + "PDFE.Views.ChartSettingsAdvanced.textGridLines": "Gridlines", + "PDFE.Views.ChartSettingsAdvanced.textHeight": "Height", + "PDFE.Views.ChartSettingsAdvanced.textHideAxis": "Hide axis", + "PDFE.Views.ChartSettingsAdvanced.textHigh": "High", + "PDFE.Views.ChartSettingsAdvanced.textHorAxis": "Horizontal Axis", + "PDFE.Views.ChartSettingsAdvanced.textHorAxisSec": "Secondary Horizontal Axis", + "PDFE.Views.ChartSettingsAdvanced.textHorizontal": "Horizontal", + "PDFE.Views.ChartSettingsAdvanced.textHundredMil": "100 000 000", + "PDFE.Views.ChartSettingsAdvanced.textHundreds": "Hundreds", + "PDFE.Views.ChartSettingsAdvanced.textHundredThousands": "100 000", + "PDFE.Views.ChartSettingsAdvanced.textIn": "In", + "PDFE.Views.ChartSettingsAdvanced.textInnerBottom": "Inner Bottom", + "PDFE.Views.ChartSettingsAdvanced.textInnerTop": "Inner Top", + "PDFE.Views.ChartSettingsAdvanced.textKeepRatio": "Constant proportions", + "PDFE.Views.ChartSettingsAdvanced.textLabelDist": "Axis Label Distance", + "PDFE.Views.ChartSettingsAdvanced.textLabelInterval": "Interval between Labels", + "PDFE.Views.ChartSettingsAdvanced.textLabelOptions": "Label Options", + "PDFE.Views.ChartSettingsAdvanced.textLabelPos": "Label Position", + "PDFE.Views.ChartSettingsAdvanced.textLayout": "Layout", + "PDFE.Views.ChartSettingsAdvanced.textLeftOverlay": "Left Overlay", + "PDFE.Views.ChartSettingsAdvanced.textLegendBottom": "Bottom", + "PDFE.Views.ChartSettingsAdvanced.textLegendLeft": "Left", + "PDFE.Views.ChartSettingsAdvanced.textLegendPos": "Legend", + "PDFE.Views.ChartSettingsAdvanced.textLegendRight": "Right", + "PDFE.Views.ChartSettingsAdvanced.textLegendTop": "Top", + "PDFE.Views.ChartSettingsAdvanced.textLines": "Lines", + "PDFE.Views.ChartSettingsAdvanced.textLogScale": "Logarithmic Scale", + "PDFE.Views.ChartSettingsAdvanced.textLow": "Low", + "PDFE.Views.ChartSettingsAdvanced.textMajor": "Major", + "PDFE.Views.ChartSettingsAdvanced.textMajorMinor": "Major and Minor", + "PDFE.Views.ChartSettingsAdvanced.textMajorType": "Major Type", + "PDFE.Views.ChartSettingsAdvanced.textManual": "Manual", + "PDFE.Views.ChartSettingsAdvanced.textMarkers": "Markers", + "PDFE.Views.ChartSettingsAdvanced.textMarksInterval": "Interval between Marks", + "PDFE.Views.ChartSettingsAdvanced.textMaxValue": "Maximum Value", + "PDFE.Views.ChartSettingsAdvanced.textMillions": "Millions", + "PDFE.Views.ChartSettingsAdvanced.textMinor": "Minor", + "PDFE.Views.ChartSettingsAdvanced.textMinorType": "Minor Type", + "PDFE.Views.ChartSettingsAdvanced.textMinValue": "Minimum Value", + "PDFE.Views.ChartSettingsAdvanced.textNextToAxis": "Next to axis", + "PDFE.Views.ChartSettingsAdvanced.textNone": "None", + "PDFE.Views.ChartSettingsAdvanced.textNoOverlay": "No Overlay", + "PDFE.Views.ChartSettingsAdvanced.textOnTickMarks": "On Tick Marks", + "PDFE.Views.ChartSettingsAdvanced.textOut": "Out", + "PDFE.Views.ChartSettingsAdvanced.textOuterTop": "Outer Top", + "PDFE.Views.ChartSettingsAdvanced.textOverlay": "Overlay", + "PDFE.Views.ChartSettingsAdvanced.textPlacement": "Placement", + "PDFE.Views.ChartSettingsAdvanced.textPosition": "Position", + "PDFE.Views.ChartSettingsAdvanced.textReverse": "Values in reverse order", + "PDFE.Views.ChartSettingsAdvanced.textRightOverlay": "Right Overlay", + "PDFE.Views.ChartSettingsAdvanced.textRotated": "Rotated", + "PDFE.Views.ChartSettingsAdvanced.textSeparator": "Data Labels Separator", + "PDFE.Views.ChartSettingsAdvanced.textSeriesName": "Series Name", + "PDFE.Views.ChartSettingsAdvanced.textSize": "Size", + "PDFE.Views.ChartSettingsAdvanced.textSmooth": "Smooth", + "PDFE.Views.ChartSettingsAdvanced.textStraight": "Straight", + "PDFE.Views.ChartSettingsAdvanced.textTenMillions": "10 000 000", + "PDFE.Views.ChartSettingsAdvanced.textTenThousands": "10 000", + "PDFE.Views.ChartSettingsAdvanced.textThousands": "Thousands", + "PDFE.Views.ChartSettingsAdvanced.textTickOptions": "Tick Options", + "PDFE.Views.ChartSettingsAdvanced.textTitle": "Chart - Advanced settings", + "PDFE.Views.ChartSettingsAdvanced.textTopLeftCorner": "Top left corner", + "PDFE.Views.ChartSettingsAdvanced.textTrillions": "Trillions", + "PDFE.Views.ChartSettingsAdvanced.textUnits": "Display Units", + "PDFE.Views.ChartSettingsAdvanced.textValue": "Value", + "PDFE.Views.ChartSettingsAdvanced.textVertAxis": "Vertical Axis", + "PDFE.Views.ChartSettingsAdvanced.textVertAxisSec": "Secondary Vertical Axis", + "PDFE.Views.ChartSettingsAdvanced.textVertical": "Vertical", + "PDFE.Views.ChartSettingsAdvanced.textWidth": "Width", + "PDFE.Views.ChartSettingsDlg.textLeftOverlay": "Left overlay", "PDFE.Views.Toolbar.capBtnComment": "Comment", "PDFE.Views.Toolbar.capBtnDelPage": "Delete Page", "PDFE.Views.Toolbar.capBtnDownloadForm": "Download As PDF",