Add new chart types

This commit is contained in:
Julia Radzhabova 2021-01-14 12:57:22 +03:00
parent 499a033585
commit 86e628b6b6
14 changed files with 80 additions and 34 deletions

View file

@ -440,6 +440,9 @@ define(function(){ 'use strict';
textBarNormal3dPerspective: '3-D column', textBarNormal3dPerspective: '3-D column',
textLineStacked: 'Stacked line', textLineStacked: 'Stacked line',
textLineStackedPer: '100% Stacked line', textLineStackedPer: '100% Stacked line',
textLineMarker: 'Line with markers',
textLineStackedMarker: 'Stacked line with markers',
textLineStackedPerMarker: '100% Stacked line with markers',
textLine3d: '3-D line', textLine3d: '3-D line',
textDoughnut: 'Doughnut', textDoughnut: 'Doughnut',
textPie3d: '3-D pie', textPie3d: '3-D pie',
@ -452,6 +455,10 @@ define(function(){ 'use strict';
textAreaStacked: 'Stacked area', textAreaStacked: 'Stacked area',
textAreaStackedPer: '100% Stacked area', textAreaStackedPer: '100% Stacked area',
textScatter: 'Scatter', textScatter: 'Scatter',
textScatterSmoothMarker: 'Scatter with smooth lines and markers',
textScatterSmooth: 'Scatter with smooth lines',
textScatterLineMarker: 'Scatter with straight lines and markers',
textScatterLine: 'Scatter with straight lines',
textComboBarLine: 'Clustered column - line', textComboBarLine: 'Clustered column - line',
textComboBarLineSecondary: 'Clustered column - line on secondary axis', textComboBarLineSecondary: 'Clustered column - line on secondary axis',
textComboAreaBar: 'Stacked area - clustered column', textComboAreaBar: 'Stacked area - clustered column',
@ -464,8 +471,8 @@ define(function(){ 'use strict';
{id: 'menu-chart-group-pie', caption: this.textPie}, {id: 'menu-chart-group-pie', caption: this.textPie},
{id: 'menu-chart-group-hbar', caption: this.textBar}, {id: 'menu-chart-group-hbar', caption: this.textBar},
{id: 'menu-chart-group-area', caption: this.textArea, inline: true}, {id: 'menu-chart-group-area', caption: this.textArea, inline: true},
{id: 'menu-chart-group-scatter', caption: this.textPoint, inline: true},
{id: 'menu-chart-group-stock', caption: this.textStock, inline: true}, {id: 'menu-chart-group-stock', caption: this.textStock, inline: true},
{id: 'menu-chart-group-scatter', caption: this.textPoint},
{id: 'menu-chart-group-combo', caption: this.textCombo} {id: 'menu-chart-group-combo', caption: this.textCombo}
// {id: 'menu-chart-group-surface', caption: this.textSurface} // {id: 'menu-chart-group-surface', caption: this.textSurface}
]; ];
@ -483,6 +490,9 @@ define(function(){ 'use strict';
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal', tip: this.textLine}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal', tip: this.textLine},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack', tip: this.textLineStacked}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack', tip: this.textLineStacked},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack', tip: this.textLineStackedPer}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack', tip: this.textLineStackedPer},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormalMarker, iconCls: 'line-normal-marker', tip: this.textLineMarker},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedMarker, iconCls: 'line-stack-marker', tip: this.textLineStackedMarker},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPerMarker,iconCls: 'line-pstack-marker', tip: this.textLineStackedPerMarker},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d', tip: this.textLine3d, is3d: true}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d', tip: this.textLine3d, is3d: true},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal', tip: this.textPie}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal', tip: this.textPie},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut', tip: this.textDoughnut}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut', tip: this.textDoughnut},
@ -497,6 +507,10 @@ define(function(){ 'use strict';
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack', tip: this.textAreaStacked}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack', tip: this.textAreaStacked},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack', tip: this.textAreaStackedPer}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack', tip: this.textAreaStackedPer},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal', tip: this.textScatter}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal', tip: this.textScatter},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatterSmoothMarker,iconCls: 'point-smooth-marker', tip: this.textScatterSmoothMarker},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatterSmooth, iconCls: 'point-smooth', tip: this.textScatterSmooth},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatterLineMarker, iconCls: 'point-line-marker', tip: this.textScatterLineMarker},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatterLine, iconCls: 'point-line', tip: this.textScatterLine},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal', tip: this.textStock}, { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal', tip: this.textStock},
{ group: 'menu-chart-group-combo', type: Asc.c_oAscChartTypeSettings.comboBarLine, iconCls: 'combo-bar-line', tip: this.textComboBarLine}, { group: 'menu-chart-group-combo', type: Asc.c_oAscChartTypeSettings.comboBarLine, iconCls: 'combo-bar-line', tip: this.textComboBarLine},
{ group: 'menu-chart-group-combo', type: Asc.c_oAscChartTypeSettings.comboBarLineSecondary, iconCls: 'combo-bar-line-sec', tip: this.textComboBarLineSecondary}, { group: 'menu-chart-group-combo', type: Asc.c_oAscChartTypeSettings.comboBarLineSecondary, iconCls: 'combo-bar-line-sec', tip: this.textComboBarLineSecondary},

View file

@ -517,6 +517,8 @@
// charts // charts
.menu-insertchart { .menu-insertchart {
margin: 5px 5px 0 10px;
.group-description { .group-description {
padding-left: 4px; padding-left: 4px;
} }

View file

@ -250,9 +250,9 @@ define([
cls : 'btn-large-dataview', cls : 'btn-large-dataview',
iconCls : 'svgicon chart-column-normal', iconCls : 'svgicon chart-column-normal',
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'width: 364px; padding-top: 12px;', style: 'width: 364px;',
items: [ items: [
{ template: _.template('<div id="id-chart-menu-type" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>') } { template: _.template('<div id="id-chart-menu-type" class="menu-insertchart" ></div>') }
] ]
}) })
}); });
@ -260,7 +260,7 @@ define([
me.mnuChartTypePicker = new Common.UI.DataView({ me.mnuChartTypePicker = new Common.UI.DataView({
el: $('#id-chart-menu-type'), el: $('#id-chart-menu-type'),
parentMenu: btn.menu, parentMenu: btn.menu,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()), groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()), store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')

View file

@ -1756,7 +1756,7 @@ define([
this.btnInsertChart.setMenu( new Common.UI.Menu({ this.btnInsertChart.setMenu( new Common.UI.Menu({
style: 'width: 364px;', style: 'width: 364px;',
items: [ items: [
{template: _.template('<div id="id-toolbar-menu-insertchart" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>')} {template: _.template('<div id="id-toolbar-menu-insertchart" class="menu-insertchart"></div>')}
] ]
})); }));
@ -1765,8 +1765,8 @@ define([
el: $('#id-toolbar-menu-insertchart'), el: $('#id-toolbar-menu-insertchart'),
parentMenu: menu, parentMenu: menu,
showLast: false, showLast: false,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData(true)), groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()), store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
}); });

View file

@ -104,10 +104,17 @@
"Common.define.chartData.textLine3d": "3-D line", "Common.define.chartData.textLine3d": "3-D line",
"Common.define.chartData.textLineStacked": "Stacked line", "Common.define.chartData.textLineStacked": "Stacked line",
"Common.define.chartData.textLineStackedPer": "100% Stacked line", "Common.define.chartData.textLineStackedPer": "100% Stacked line",
"Common.define.chartData.textLineMarker": "Line with markers",
"Common.define.chartData.textLineStackedMarker": "Stacked line with markers",
"Common.define.chartData.textLineStackedPerMarker": "100% Stacked line with markers",
"Common.define.chartData.textPie": "Pie", "Common.define.chartData.textPie": "Pie",
"Common.define.chartData.textPie3d": "3-D pie", "Common.define.chartData.textPie3d": "3-D pie",
"Common.define.chartData.textPoint": "XY (Scatter)", "Common.define.chartData.textPoint": "XY (Scatter)",
"Common.define.chartData.textScatter": "Scatter", "Common.define.chartData.textScatter": "Scatter",
"Common.define.chartData.textScatterSmoothMarker": "Scatter with smooth lines and markers",
"Common.define.chartData.textScatterSmooth": "Scatter with smooth lines",
"Common.define.chartData.textScatterLineMarker": "Scatter with straight lines and markers",
"Common.define.chartData.textScatterLine": "Scatter with straight lines",
"Common.define.chartData.textStock": "Stock", "Common.define.chartData.textStock": "Stock",
"Common.define.chartData.textSurface": "Surface", "Common.define.chartData.textSurface": "Surface",
"Common.Translation.warnFileLocked": "You can't edit this file because it's being edited in another app.", "Common.Translation.warnFileLocked": "You can't edit this file because it's being edited in another app.",

View file

@ -203,9 +203,9 @@ define([
cls : 'btn-large-dataview', cls : 'btn-large-dataview',
iconCls : 'svgicon chart-bar-normal', iconCls : 'svgicon chart-bar-normal',
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'width: 364px; padding-top: 12px;', style: 'width: 364px;',
items: [ items: [
{ template: _.template('<div id="id-chart-menu-type" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>') } { template: _.template('<div id="id-chart-menu-type" class="menu-insertchart"></div>') }
] ]
}) })
}); });
@ -213,7 +213,7 @@ define([
me.mnuChartTypePicker = new Common.UI.DataView({ me.mnuChartTypePicker = new Common.UI.DataView({
el: $('#id-chart-menu-type'), el: $('#id-chart-menu-type'),
parentMenu: btn.menu, parentMenu: btn.menu,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()), groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()), store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')

View file

@ -3653,7 +3653,7 @@ define([
this.placeholderMenuChart = menu = new Common.UI.Menu({ this.placeholderMenuChart = menu = new Common.UI.Menu({
style: 'width: 364px;', style: 'width: 364px;',
items: [ items: [
{template: _.template('<div id="id-placeholder-menu-chart" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>')} {template: _.template('<div id="id-placeholder-menu-chart" class="menu-insertchart"></div>')}
] ]
}); });
// Prepare menu container // Prepare menu container

View file

@ -1208,7 +1208,7 @@ define([
this.btnInsertChart.setMenu( new Common.UI.Menu({ this.btnInsertChart.setMenu( new Common.UI.Menu({
style: 'width: 364px;', style: 'width: 364px;',
items: [ items: [
{template: _.template('<div id="id-toolbar-menu-insertchart" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>')} {template: _.template('<div id="id-toolbar-menu-insertchart" class="menu-insertchart"></div>')}
] ]
})); }));
@ -1217,8 +1217,8 @@ define([
el: $('#id-toolbar-menu-insertchart'), el: $('#id-toolbar-menu-insertchart'),
parentMenu: menu, parentMenu: menu,
showLast: false, showLast: false,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData(true)), groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()), store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
}); });

View file

@ -34,10 +34,17 @@
"Common.define.chartData.textLine3d": "3-D line", "Common.define.chartData.textLine3d": "3-D line",
"Common.define.chartData.textLineStacked": "Stacked line", "Common.define.chartData.textLineStacked": "Stacked line",
"Common.define.chartData.textLineStackedPer": "100% Stacked line", "Common.define.chartData.textLineStackedPer": "100% Stacked line",
"Common.define.chartData.textLineMarker": "Line with markers",
"Common.define.chartData.textLineStackedMarker": "Stacked line with markers",
"Common.define.chartData.textLineStackedPerMarker": "100% Stacked line with markers",
"Common.define.chartData.textPie": "Pie", "Common.define.chartData.textPie": "Pie",
"Common.define.chartData.textPie3d": "3-D pie", "Common.define.chartData.textPie3d": "3-D pie",
"Common.define.chartData.textPoint": "XY (Scatter)", "Common.define.chartData.textPoint": "XY (Scatter)",
"Common.define.chartData.textScatter": "Scatter", "Common.define.chartData.textScatter": "Scatter",
"Common.define.chartData.textScatterSmoothMarker": "Scatter with smooth lines and markers",
"Common.define.chartData.textScatterSmooth": "Scatter with smooth lines",
"Common.define.chartData.textScatterLineMarker": "Scatter with straight lines and markers",
"Common.define.chartData.textScatterLine": "Scatter with straight lines",
"Common.define.chartData.textStock": "Stock", "Common.define.chartData.textStock": "Stock",
"Common.define.chartData.textSurface": "Surface", "Common.define.chartData.textSurface": "Surface",
"Common.Translation.warnFileLocked": "The file is being edited in another app. You can continue editing and save it as a copy.", "Common.Translation.warnFileLocked": "The file is being edited in another app. You can continue editing and save it as a copy.",

View file

@ -646,9 +646,9 @@ define([
cls : 'btn-large-dataview', cls : 'btn-large-dataview',
iconCls : 'svgicon chart-spark-column', iconCls : 'svgicon chart-spark-column',
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'width: 167px; padding-top: 12px;', style: 'width: 167px;',
items: [ items: [
{ template: _.template('<div id="id-spark-menu-type" class="menu-insertchart" style="margin: 5px 5px 0 10px;"></div>') } { template: _.template('<div id="id-spark-menu-type" class="menu-insertchart"></div>') }
] ]
}) })
}); });

View file

@ -123,10 +123,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
cls: 'btn-large-dataview', cls: 'btn-large-dataview',
iconCls: 'svgicon chart-bar-normal', iconCls: 'svgicon chart-bar-normal',
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
style: 'width: 364px; padding-top: 12px;', style: 'width: 364px;',
additionalAlign: this.menuAddAlign, additionalAlign: this.menuAddAlign,
items: [ items: [
{template: _.template('<div id="id-chart-dlg-menu-type" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>')} {template: _.template('<div id="id-chart-dlg-menu-type" class="menu-insertchart"></div>')}
] ]
}) })
}); });
@ -134,7 +134,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
me.mnuChartTypePicker = new Common.UI.DataView({ me.mnuChartTypePicker = new Common.UI.DataView({
el: $('#id-chart-dlg-menu-type'), el: $('#id-chart-dlg-menu-type'),
parentMenu: btn.menu, parentMenu: btn.menu,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()), groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()), store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
@ -774,10 +774,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
cls : 'btn-large-dataview', cls : 'btn-large-dataview',
iconCls : 'svgicon chart-spark-column', iconCls : 'svgicon chart-spark-column',
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'width: 167px; padding-top: 12px;', style: 'width: 167px;',
additionalAlign: this.menuAddAlign, additionalAlign: this.menuAddAlign,
items: [ items: [
{ template: _.template('<div id="id-spark-dlg-menu-type" class="menu-insertchart" style="margin: 5px 5px 0 10px;"></div>') } { template: _.template('<div id="id-spark-dlg-menu-type" class="menu-insertchart"></div>') }
] ]
}) })
}); });
@ -1115,7 +1115,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
updateAxisProps: function(type, isDefault) { updateAxisProps: function(type, isDefault) {
var value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked || var value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked ||
type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.scatter); 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.chMarkers.setVisible(value);
this.cmbLines.setVisible(value); this.cmbLines.setVisible(value);
this.lblLines.toggleClass('hidden', !value); this.lblLines.toggleClass('hidden', !value);
@ -1144,7 +1147,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value = (type == Asc.c_oAscChartTypeSettings.hBarNormal || type == Asc.c_oAscChartTypeSettings.hBarStacked || type == Asc.c_oAscChartTypeSettings.hBarStackedPer || value = (type == Asc.c_oAscChartTypeSettings.hBarNormal || type == Asc.c_oAscChartTypeSettings.hBarStacked || type == Asc.c_oAscChartTypeSettings.hBarStackedPer ||
type == Asc.c_oAscChartTypeSettings.hBarNormal3d || type == Asc.c_oAscChartTypeSettings.hBarStacked3d || type == Asc.c_oAscChartTypeSettings.hBarStackedPer3d); type == Asc.c_oAscChartTypeSettings.hBarNormal3d || type == Asc.c_oAscChartTypeSettings.hBarStacked3d || type == Asc.c_oAscChartTypeSettings.hBarStackedPer3d);
this.btnsCategory[2].options.contentTarget = (value) ? 'id-chart-settings-dlg-hor' : 'id-chart-settings-dlg-vert'; this.btnsCategory[2].options.contentTarget = (value) ? 'id-chart-settings-dlg-hor' : 'id-chart-settings-dlg-vert';
this.btnsCategory[4].options.contentTarget = (value || type == Asc.c_oAscChartTypeSettings.scatter) ? 'id-chart-settings-dlg-vert' : 'id-chart-settings-dlg-hor'; this.btnsCategory[4].options.contentTarget = (value || 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) ? 'id-chart-settings-dlg-vert' : 'id-chart-settings-dlg-hor';
}, },
updateDataLabels: function(chartType, labelPos) { updateDataLabels: function(chartType, labelPos) {
@ -1161,7 +1165,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
data.push({ value: Asc.c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom }, data.push({ value: Asc.c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom },
{ value: Asc.c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop }); { value: Asc.c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop });
else if (chartType == Asc.c_oAscChartTypeSettings.lineNormal || chartType == Asc.c_oAscChartTypeSettings.lineStacked || chartType == Asc.c_oAscChartTypeSettings.lineStackedPer || else if (chartType == Asc.c_oAscChartTypeSettings.lineNormal || chartType == Asc.c_oAscChartTypeSettings.lineStacked || chartType == Asc.c_oAscChartTypeSettings.lineStackedPer ||
chartType == Asc.c_oAscChartTypeSettings.stock || chartType == Asc.c_oAscChartTypeSettings.scatter) chartType == Asc.c_oAscChartTypeSettings.lineNormalMarker || chartType == Asc.c_oAscChartTypeSettings.lineStackedMarker || chartType == Asc.c_oAscChartTypeSettings.lineStackedPerMarker ||
chartType == Asc.c_oAscChartTypeSettings.stock || chartType == Asc.c_oAscChartTypeSettings.scatter || chartType == Asc.c_oAscChartTypeSettings.scatterSmoothMarker ||
chartType == Asc.c_oAscChartTypeSettings.scatterSmooth || chartType == Asc.c_oAscChartTypeSettings.scatterLineMarker || chartType == Asc.c_oAscChartTypeSettings.scatterLine)
data.push({ value: Asc.c_oAscChartDataLabelsPos.l, displayValue: this.textLeft }, data.push({ value: Asc.c_oAscChartDataLabelsPos.l, displayValue: this.textLeft },
{ value: Asc.c_oAscChartDataLabelsPos.r, displayValue: this.textRight }, { value: Asc.c_oAscChartDataLabelsPos.r, displayValue: this.textRight },
{ value: Asc.c_oAscChartDataLabelsPos.t, displayValue: this.textTop }, { value: Asc.c_oAscChartDataLabelsPos.t, displayValue: this.textTop },
@ -1519,7 +1525,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.chartSettings.putShowMarker(this.chMarkers.getValue()=='checked'); this.chartSettings.putShowMarker(this.chMarkers.getValue()=='checked');
value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked || value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked ||
type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.scatter); 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) { if (value) {
value = this.cmbLines.getValue(); value = this.cmbLines.getValue();
this.chartSettings.putLine(value!==0); this.chartSettings.putLine(value!==0);

View file

@ -146,10 +146,10 @@ define([
cls : 'btn-large-dataview', cls : 'btn-large-dataview',
iconCls : 'svgicon chart-bar-normal', iconCls : 'svgicon chart-bar-normal',
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'width: 364px; padding-top: 12px;', style: 'width: 364px;',
additionalAlign: this.menuAddAlign, additionalAlign: this.menuAddAlign,
items: [ items: [
{ template: _.template('<div id="chart-type-dlg-menu-type" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>') } { template: _.template('<div id="chart-type-dlg-menu-type" class="menu-insertchart"></div>') }
] ]
}) })
}); });
@ -157,7 +157,7 @@ define([
me.mnuChartTypePicker = new Common.UI.DataView({ me.mnuChartTypePicker = new Common.UI.DataView({
el: $('#chart-type-dlg-menu-type', me.$window), el: $('#chart-type-dlg-menu-type', me.$window),
parentMenu: btn.menu, parentMenu: btn.menu,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()), groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(arr), store: new Common.UI.DataViewStore(arr),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
@ -394,10 +394,10 @@ define([
}); });
var combomenu = new Common.UI.Menu({ var combomenu = new Common.UI.Menu({
cls: 'menu-absolute', cls: 'menu-absolute',
style: 'width: 318px; padding-top: 12px;', style: 'width: 318px;',
additionalAlign: this.menuAddAlign, additionalAlign: this.menuAddAlign,
items: [ items: [
{ template: _.template('<div id="chart-type-dlg-series-menu-' + index + '" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>') } { template: _.template('<div id="chart-type-dlg-series-menu-' + index + '" class="menu-insertchart"></div>') }
] ]
}); });
combomenu.render(el); combomenu.render(el);
@ -406,7 +406,7 @@ define([
var picker = new Common.UI.DataView({ var picker = new Common.UI.DataView({
el: $('#chart-type-dlg-series-menu-' + index), el: $('#chart-type-dlg-series-menu-' + index),
parentMenu: menu, parentMenu: menu,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(me._arrSeriesGroups), groups: new Common.UI.DataViewGroupStore(me._arrSeriesGroups),
store: store, store: store,
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')

View file

@ -1873,7 +1873,7 @@ define([
this.btnInsertChart.setMenu(new Common.UI.Menu({ this.btnInsertChart.setMenu(new Common.UI.Menu({
style: 'width: 364px;', style: 'width: 364px;',
items: [ items: [
{ template: _.template('<div id="id-toolbar-menu-insertchart" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>') } { template: _.template('<div id="id-toolbar-menu-insertchart" class="menu-insertchart"></div>') }
] ]
})); }));
@ -1882,8 +1882,8 @@ define([
el: $('#id-toolbar-menu-insertchart'), el: $('#id-toolbar-menu-insertchart'),
parentMenu: menu, parentMenu: menu,
showLast: false, showLast: false,
restoreHeight: 421, restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData(true)/*.concat(Common.define.chartData.getSparkGroupData(true))*/), groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()/*.concat(Common.define.chartData.getSparkGroupData(true))*/),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()/*.concat(Common.define.chartData.getSparkData())*/), store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()/*.concat(Common.define.chartData.getSparkData())*/),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
}); });

View file

@ -33,10 +33,17 @@
"Common.define.chartData.textLineSpark": "Line", "Common.define.chartData.textLineSpark": "Line",
"Common.define.chartData.textLineStacked": "Stacked line", "Common.define.chartData.textLineStacked": "Stacked line",
"Common.define.chartData.textLineStackedPer": "100% Stacked line", "Common.define.chartData.textLineStackedPer": "100% Stacked line",
"Common.define.chartData.textLineMarker": "Line with markers",
"Common.define.chartData.textLineStackedMarker": "Stacked line with markers",
"Common.define.chartData.textLineStackedPerMarker": "100% Stacked line with markers",
"Common.define.chartData.textPie": "Pie", "Common.define.chartData.textPie": "Pie",
"Common.define.chartData.textPie3d": "3-D pie", "Common.define.chartData.textPie3d": "3-D pie",
"Common.define.chartData.textPoint": "XY (Scatter)", "Common.define.chartData.textPoint": "XY (Scatter)",
"Common.define.chartData.textScatter": "Scatter", "Common.define.chartData.textScatter": "Scatter",
"Common.define.chartData.textScatterSmoothMarker": "Scatter with smooth lines and markers",
"Common.define.chartData.textScatterSmooth": "Scatter with smooth lines",
"Common.define.chartData.textScatterLineMarker": "Scatter with straight lines and markers",
"Common.define.chartData.textScatterLine": "Scatter with straight lines",
"Common.define.chartData.textSparks": "Sparklines", "Common.define.chartData.textSparks": "Sparklines",
"Common.define.chartData.textStock": "Stock", "Common.define.chartData.textStock": "Stock",
"Common.define.chartData.textSurface": "Surface", "Common.define.chartData.textSurface": "Surface",