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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55106 954022d7-b5bf-4e40-9824-e11837661b57
parent 6047fd32
...@@ -1365,8 +1365,8 @@ DrawingObjectsController.prototype = ...@@ -1365,8 +1365,8 @@ DrawingObjectsController.prototype =
vert_axis.title.txPr.setBodyPr(new CBodyPr()); vert_axis.title.txPr.setBodyPr(new CBodyPr());
} }
vert_axis.title.txPr.bodyPr.reset(); vert_axis.title.txPr.bodyPr.reset();
vert_axis.title.txPr.bodyPr.setRot(vert_axis_labels_settings === c_oAscChartVertAxisLabelShowSettings.rotated ? Math.PI/2 : 0); if(vert_axis_labels_settings === c_oAscChartVertAxisLabelShowSettings.rotated)
vert_axis.title.txPr.bodyPr.setVert(nVertTThorz); vert_axis.title.txPr.bodyPr.setVert(nVertTTvert);
} }
} }
} }
......
...@@ -181,13 +181,33 @@ CPlotArea.prototype = ...@@ -181,13 +181,33 @@ CPlotArea.prototype =
getHorizontalAxis: function() getHorizontalAxis: function()
{ {
return this.catAx; //TODO var axis_by_types = this.getAxisByTypes();
if(axis_by_types.valAx.length === 1 && axis_by_types.catAx.length === 1)
{
if(axis_by_types.valAx[0].axPos === AX_POS_B || axis_by_types.valAx[0].axPos === AX_POS_T)
return axis_by_types.valAx[0]
else
return axis_by_types.catAx[0];
}
else
return null;
}, },
getVerticalAxis: function() getVerticalAxis: function()
{ {
return this.valAx; //TODO var axis_by_types = this.getAxisByTypes();
if(axis_by_types.valAx.length === 1 && axis_by_types.catAx.length === 1)
{
if(axis_by_types.valAx[0].axPos === AX_POS_L || axis_by_types.valAx[0].axPos === AX_POS_R)
return axis_by_types.valAx[0];
else
return axis_by_types.catAx[0];
}
else
return null;
}, },
getAxisByTypes: function() getAxisByTypes: function()
......
...@@ -635,12 +635,7 @@ CChartSpace.prototype.recalculateGridLines = function() ...@@ -635,12 +635,7 @@ CChartSpace.prototype.recalculateGridLines = function()
CChartSpace.prototype.recalculateMarkers = function() CChartSpace.prototype.recalculateMarkers = function()
{ {
if(/*this.chart && this.chart.plotArea && this.chart.plotArea.chart if(this.chart.plotArea.chart.getObjectType() !== historyitem_type_LineChart && this.chart.plotArea.chart.getObjectType() !== historyitem_type_RadarChart || this.chart.plotArea.chart.marker)
&& ((this.chart.plotArea.chart instanceof CLineChart && this.chart.plotArea.chart.marker)
|| this.chart.plotArea.chart instanceof CScatterChart
|| this.chart.plotArea.chart instanceof CStockChart)
&& this.chart.plotArea.chart.series*/
this.chart.plotArea.chart.getObjectType() !== historyitem_type_LineChart && this.chart.plotArea.chart.getObjectType() !== historyitem_type_RadarChart || this.chart.plotArea.chart.marker)
{ {
var chart_style = CHART_STYLE_MANAGER.getStyleByIndex(this.style); var chart_style = CHART_STYLE_MANAGER.getStyleByIndex(this.style);
var effect_fill = chart_style.fill1; var effect_fill = chart_style.fill1;
...@@ -768,6 +763,32 @@ CChartSpace.prototype.recalculateMarkers = function() ...@@ -768,6 +763,32 @@ CChartSpace.prototype.recalculateMarkers = function()
} }
} }
} }
else
{
var series = this.chart.plotArea.chart.series;
for(var i = 0; i < series.length; ++i)
{
var ser = series[i];
ser.compiledSeriesMarker = null;
if(ser.val)
{
pts = ser.val.numRef.numCache.pts;
}
else if(ser.yVal)
{
pts = ser.yVal.numRef.numCache.pts;
}
else
{
pts = [];
}
for(var j = 0; j < pts.length; ++j)
{
pts[j].compiledMarker = null;
}
}
}
}; };
CChartSpace.prototype.recalculateSeriesColors = function() CChartSpace.prototype.recalculateSeriesColors = function()
...@@ -2763,8 +2784,6 @@ CChartSpace.prototype.recalculateAxis = function() ...@@ -2763,8 +2784,6 @@ CChartSpace.prototype.recalculateAxis = function()
} }
} }
val_ax.labels = new CValAxisLabels(this); val_ax.labels = new CValAxisLabels(this);
var max_width = 0; var max_width = 0;
val_ax.yPoints = []; val_ax.yPoints = [];
...@@ -3206,7 +3225,7 @@ CChartSpace.prototype.recalculateAxis = function() ...@@ -3206,7 +3225,7 @@ CChartSpace.prototype.recalculateAxis = function()
} }
//скорректируем позицию вертикальной оси //скорректируем позицию вертикальной оси
val_ax.posX = rect.x + rect.x + (val_ax.posX - left_gap_point)*(rect.w/(rect.x + rect.w - left_gap_point)); val_ax.posX = rect.x + (val_ax.posX - left_gap_point)*(rect.w/(rect.x + rect.w - left_gap_point));
} }
if(right_gap_point > rect.x + rect.w) if(right_gap_point > rect.x + rect.w)
{ {
...@@ -3748,8 +3767,8 @@ CChartSpace.prototype.recalculateAxis = function() ...@@ -3748,8 +3767,8 @@ CChartSpace.prototype.recalculateAxis = function()
dlbl.txPr = val_ax.txPr; dlbl.txPr = val_ax.txPr;
dlbl.tx = new CChartText(); dlbl.tx = new CChartText();
dlbl.tx.rich = CreateTextBodyFromString(arr_strings[i], this.getDrawingDocument(), dlbl); dlbl.tx.rich = CreateTextBodyFromString(arr_strings[i], this.getDrawingDocument(), dlbl);
dlbl.recalculate(); dlbl.txBody = dlbl.tx.rich;
var h = dlbl.tx.rich.content.Get_SummaryHeight(); var h = dlbl.tx.rich.recalculateByMaxWord().h;
if(h > max_height) if(h > max_height)
max_height = h; max_height = h;
val_ax.labels.arrLabels.push(dlbl); val_ax.labels.arrLabels.push(dlbl);
...@@ -4263,6 +4282,10 @@ CChartSpace.prototype.recalculateAxis = function() ...@@ -4263,6 +4282,10 @@ CChartSpace.prototype.recalculateAxis = function()
var y_pos = val_ax.labels.y + val_axis_labels_gap; var y_pos = val_ax.labels.y + val_axis_labels_gap;
for(i = 0; i < val_ax.labels.arrLabels.length; ++i) for(i = 0; i < val_ax.labels.arrLabels.length; ++i)
{ {
//var text_transform = val_ax.labels.arrLabels[i].transformText;
//text_transform.Reset();
//global_MatrixTransformer.TranslateAppend(text_transform, )
val_ax.labels.arrLabels[i].setPosition(arr_val_labels_points[i] - val_ax.labels.arrLabels[i].tx.rich.content.XLimit, y_pos); val_ax.labels.arrLabels[i].setPosition(arr_val_labels_points[i] - val_ax.labels.arrLabels[i].tx.rich.content.XLimit, y_pos);
} }
} }
......
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