Commit c64d88d9 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

выставляем showAxis в True при добавлении диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66215 954022d7-b5bf-4e40-9824-e11837661b57
parent d644366a
...@@ -2822,6 +2822,8 @@ function DrawingObjects() { ...@@ -2822,6 +2822,8 @@ function DrawingObjects() {
settings.putStyle(2); settings.putStyle(2);
settings.putType(c_oAscChartTypeSettings.lineNormal); settings.putType(c_oAscChartTypeSettings.lineNormal);
settings.putTitle(c_oAscChartTitleShowSettings.noOverlay); settings.putTitle(c_oAscChartTitleShowSettings.noOverlay);
settings.putShowHorAxis(true);
settings.putShowVerAxis(true);
var series = getChartSeries(worksheet.model, settings); var series = getChartSeries(worksheet.model, settings);
if(series && series.series.length > 1) if(series && series.series.length > 1)
{ {
......
...@@ -1803,18 +1803,6 @@ DrawingObjectsController.prototype = ...@@ -1803,18 +1803,6 @@ DrawingObjectsController.prototype =
return G_O_DEFAULT_COLOR_MAP; return G_O_DEFAULT_COLOR_MAP;
}, },
getAscChartObject: function()
{
//var chart = null;
//for (var i = 0; i < this.selectedObjects.length; i++) {
// if ( this.selectedObjects[i].isChart() )
// {
// this.selectedObjects[i].drObjects = this;
// return this.selectedObjects[i];
// }
//}
//return chart;
},
editChartDrawingObjects: function(chart) editChartDrawingObjects: function(chart)
{ {
......
...@@ -430,8 +430,10 @@ ...@@ -430,8 +430,10 @@
var bSwapScatter = ((this.type === c_oAscChartTypeSettings.scatter) !== (type === c_oAscChartTypeSettings.scatter)); var bSwapScatter = ((this.type === c_oAscChartTypeSettings.scatter) !== (type === c_oAscChartTypeSettings.scatter));
var nOldType = this.type; var nOldType = this.type;
this.putType(type); this.putType(type);
var hor_axis_settings = this.getHorAxisProps(); var hor_axis_settings = this.getHorAxisProps();
var vert_axis_settings = this.getVertAxisProps(); var vert_axis_settings = this.getVertAxisProps();
var new_hor_axis_settings, new_vert_axis_settings, oTempVal; var new_hor_axis_settings, new_vert_axis_settings, oTempVal;
...@@ -456,6 +458,8 @@ ...@@ -456,6 +458,8 @@
this.putVertAxisProps(null); this.putVertAxisProps(null);
this.putHorAxisLabel(null); this.putHorAxisLabel(null);
this.putVertAxisLabel(null); this.putVertAxisLabel(null);
this.putShowHorAxis(null);
this.putShowVerAxis(null);
break; break;
} }
case c_oAscChartTypeSettings.barNormal : case c_oAscChartTypeSettings.barNormal :
...@@ -485,12 +489,22 @@ ...@@ -485,12 +489,22 @@
this.putVertAxisProps(new_vert_axis_settings); this.putVertAxisProps(new_vert_axis_settings);
} }
if( bSwapLines) if(bSwapLines)
{ {
this.putShowMarker(false); this.putShowMarker(false);
this.putSmooth(null); this.putSmooth(null);
this.putLine(true); this.putLine(true);
} }
if(nOldType === c_oAscChartTypeSettings.hBarNormal || nOldType === c_oAscChartTypeSettings.hBarStacked || nOldType === c_oAscChartTypeSettings.hBarStackedPer){
var bTemp = this.showHorAxis;
this.putShowHorAxis(this.showVerAxis)
this.putShowVerAxis(bTemp);
}
else if(nOldType === c_oAscChartTypeSettings.pie || nOldType === c_oAscChartTypeSettings.doughnut)
{
this.putShowHorAxis(true);
this.putShowVerAxis(true);
}
break; break;
} }
case c_oAscChartTypeSettings.hBarNormal : case c_oAscChartTypeSettings.hBarNormal :
...@@ -509,6 +523,17 @@ ...@@ -509,6 +523,17 @@
new_vert_axis_settings.setDefault(); new_vert_axis_settings.setDefault();
this.putVertAxisProps(new_vert_axis_settings); this.putVertAxisProps(new_vert_axis_settings);
} }
if(nOldType === c_oAscChartTypeSettings.pie || nOldType === c_oAscChartTypeSettings.doughnut){
this.putShowHorAxis(true);
this.putShowVerAxis(true);
}
else if(nOldType !== c_oAscChartTypeSettings.hBarNormal
&& nOldType !== c_oAscChartTypeSettings.hBarStacked
&& nOldType !== c_oAscChartTypeSettings.hBarStackedPer){
var bTemp = this.showHorAxis;
this.putShowHorAxis(this.showVerAxis)
this.putShowVerAxis(bTemp);
}
//this.putHorGridLines(c_oAscGridLinesSettings.none); //this.putHorGridLines(c_oAscGridLinesSettings.none);
//this.putVertGridLines(c_oAscGridLinesSettings.major); //this.putVertGridLines(c_oAscGridLinesSettings.major);
break; break;
...@@ -521,7 +546,6 @@ ...@@ -521,7 +546,6 @@
case c_oAscChartTypeSettings.scatterSmooth : case c_oAscChartTypeSettings.scatterSmooth :
case c_oAscChartTypeSettings.scatterSmoothMarker : case c_oAscChartTypeSettings.scatterSmoothMarker :
{ {
if(!hor_axis_settings || hor_axis_settings.getAxisType() !== c_oAscAxisType.val) if(!hor_axis_settings || hor_axis_settings.getAxisType() !== c_oAscAxisType.val)
{ {
new_hor_axis_settings = new asc_ValAxisSettings(); new_hor_axis_settings = new asc_ValAxisSettings();
...@@ -542,6 +566,15 @@ ...@@ -542,6 +566,15 @@
this.putSmooth(null); this.putSmooth(null);
this.putLine(false); this.putLine(false);
} }
if(nOldType === c_oAscChartTypeSettings.hBarNormal || nOldType === c_oAscChartTypeSettings.hBarStacked || nOldType === c_oAscChartTypeSettings.hBarStackedPer){
var bTemp = this.showHorAxis;
this.putShowHorAxis(this.showVerAxis)
this.putShowVerAxis(bTemp);
}
else if(nOldType === c_oAscChartTypeSettings.pie || nOldType === c_oAscChartTypeSettings.doughnut){
this.putShowHorAxis(true);
this.putShowVerAxis(true);
}
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment