Commit bee5f025 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Различные баги в построении preview диаграмм:

выставление для AreaChart параметра crossBetWeen в CROSS_BETWEEN_BETWEEN;
не пересчитывались заливки для plotArea, chartSpace и upDownBars при смене стиля в preview-менеджере.
Не выставлялся флаг для пересчета заливок и линий chartSpace при смене стиля диаграммы




git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57185 954022d7-b5bf-4e40-9824-e11837661b57
parent 2d2ca85a
...@@ -290,6 +290,16 @@ ChartPreviewManager.prototype.getChartByType = function(type) ...@@ -290,6 +290,16 @@ ChartPreviewManager.prototype.getChartByType = function(type)
isScatter = true; isScatter = true;
break; break;
} }
case c_oAscChartTypeSettings.areaNormal:
case c_oAscChartTypeSettings.areaStacked:
case c_oAscChartTypeSettings.areaStackedPer:
{
cat_ax_props.putLabelsPosition(CROSS_BETWEEN_BETWEEN);
vert_axis_settings = val_ax_props;
hor_axis_settings = cat_ax_props;
break;
}
default : default :
{ {
vert_axis_settings = val_ax_props; vert_axis_settings = val_ax_props;
...@@ -352,6 +362,11 @@ ChartPreviewManager.prototype.createChartPreview = function(type, styleIndex) { ...@@ -352,6 +362,11 @@ ChartPreviewManager.prototype.createChartPreview = function(type, styleIndex) {
chart_space.style = styleIndex; chart_space.style = styleIndex;
chart_space.recalculateMarkers(); chart_space.recalculateMarkers();
chart_space.recalculateSeriesColors(); chart_space.recalculateSeriesColors();
chart_space.recalculatePlotAreaChartBrush();
chart_space.recalculatePlotAreaChartPen();
chart_space.recalculateChartBrush();
chart_space.recalculateChartPen();
chart_space.recalculateUpDownBars();
} }
chart_space.recalculatePenBrush(); chart_space.recalculatePenBrush();
......
...@@ -82,7 +82,7 @@ function CChartStyleManager() ...@@ -82,7 +82,7 @@ function CChartStyleManager()
this.styles[25] = new CChartStyle(EFFECT_MODERATE, EFFECT_INTENSE, s[1], EFFECT_SUBTLE, EFFECT_NONE, [], 7, s[1], 13); this.styles[25] = new CChartStyle(EFFECT_MODERATE, EFFECT_INTENSE, s[1], EFFECT_SUBTLE, EFFECT_NONE, [], 7, s[1], 13);
for(i = 26; i < 32; ++i) for(i = 26; i < 32; ++i)
{ {
this.styles[i] = new CChartStyle(EFFECT_MODERATE, EFFECT_INTENSE, [f(i-27,0)], EFFECT_SUBTLE, EFFECT_NONE, [], 7, s[1], 13); this.styles[i] = new CChartStyle(EFFECT_MODERATE, EFFECT_INTENSE, [f(i-26,0)], EFFECT_SUBTLE, EFFECT_NONE, [], 7, s[1], 13);
} }
this.styles[32] = new CChartStyle(EFFECT_NONE, EFFECT_SUBTLE, s[0], EFFECT_SUBTLE, EFFECT_SUBTLE, [f(8, -0.5)], 5, s[0], 9); this.styles[32] = new CChartStyle(EFFECT_NONE, EFFECT_SUBTLE, s[0], EFFECT_SUBTLE, EFFECT_SUBTLE, [f(8, -0.5)], 5, s[0], 9);
this.styles[33] = new CChartStyle(EFFECT_NONE, EFFECT_SUBTLE, s[1], EFFECT_SUBTLE, EFFECT_SUBTLE, s[2], 5, s[1], 9); this.styles[33] = new CChartStyle(EFFECT_NONE, EFFECT_SUBTLE, s[1], EFFECT_SUBTLE, EFFECT_SUBTLE, s[2], 5, s[1], 9);
...@@ -94,7 +94,7 @@ function CChartStyleManager() ...@@ -94,7 +94,7 @@ function CChartStyleManager()
this.styles[41] = new CChartStyle(EFFECT_INTENSE, EFFECT_INTENSE, s[1], EFFECT_INTENSE, EFFECT_NONE, [], 5, s[1], 9); this.styles[41] = new CChartStyle(EFFECT_INTENSE, EFFECT_INTENSE, s[1], EFFECT_INTENSE, EFFECT_NONE, [], 5, s[1], 9);
for(i = 42; i < 48; ++i) for(i = 42; i < 48; ++i)
{ {
this.styles[i] = new CChartStyle(EFFECT_INTENSE, EFFECT_INTENSE, [f(i-43, 0)], EFFECT_SUBTLE, EFFECT_NONE, [], 5, [f(i-43, 0)], 9); this.styles[i] = new CChartStyle(EFFECT_INTENSE, EFFECT_INTENSE, [f(i-42, 0)], EFFECT_SUBTLE, EFFECT_NONE, [], 5, [f(i-42, 0)], 9);
} }
this.defaultLineStyles = []; this.defaultLineStyles = [];
...@@ -6285,14 +6285,15 @@ CChartSpace.prototype = ...@@ -6285,14 +6285,15 @@ CChartSpace.prototype =
{ {
var plot_area = this.chart.plotArea; var plot_area = this.chart.plotArea;
var default_brush; var default_brush;
var tint = 0.20000;
if(this.style >=1 && this.style <=32) if(this.style >=1 && this.style <=32)
default_brush = CreateUnifillSolidFillSchemeColor(6, 0); default_brush = CreateUnifillSolidFillSchemeColor(6, tint);
else if(this.style >=33 && this.style <= 34) else if(this.style >=33 && this.style <= 34)
default_brush = CreateUnifillSolidFillSchemeColor(8, 0.20000); default_brush = CreateUnifillSolidFillSchemeColor(8, 0.20000);
else if(this.style >=35 && this.style <=40) else if(this.style >=35 && this.style <=40)
default_brush = CreateUnifillSolidFillSchemeColor(this.style - 35, 0); default_brush = CreateUnifillSolidFillSchemeColor(this.style - 35, 0 + tint);
else else
default_brush = CreateUnifillSolidFillSchemeColor(8, 0.95000); default_brush = CreateUnifillSolidFillSchemeColor(8, 0.95000 - tint);
if(plot_area.spPr && plot_area.spPr.Fill) if(plot_area.spPr && plot_area.spPr.Fill)
{ {
...@@ -6758,7 +6759,7 @@ CChartSpace.prototype = ...@@ -6758,7 +6759,7 @@ CChartSpace.prototype =
else if(this.style >= 33 && this.style <= 34) else if(this.style >= 33 && this.style <= 34)
default_line.setFill(CreateUnifillSolidFillSchemeColor(8, 0)); default_line.setFill(CreateUnifillSolidFillSchemeColor(8, 0));
else if(this.style >= 35 && this.style <= 40) else if(this.style >= 35 && this.style <= 40)
default_line.setFill(CreateUnifillSolidFillSchemeColor(8, -25000)); default_line.setFill(CreateUnifillSolidFillSchemeColor(8, -0.25000));
else else
default_line.setFill(CreateUnifillSolidFillSchemeColor(12, 0)); default_line.setFill(CreateUnifillSolidFillSchemeColor(12, 0));
default_line.merge(this.chart.plotArea.chart.hiLowLines.ln); default_line.merge(this.chart.plotArea.chart.hiLowLines.ln);
......
...@@ -141,6 +141,8 @@ CChartSpace.prototype.handleUpdateStyle = function() ...@@ -141,6 +141,8 @@ CChartSpace.prototype.handleUpdateStyle = function()
this.recalcInfo.recalculateLegend = true; this.recalcInfo.recalculateLegend = true;
this.recalcInfo.recalculatePlotAreaBrush = true; this.recalcInfo.recalculatePlotAreaBrush = true;
this.recalcInfo.recalculatePlotAreaPen = true; this.recalcInfo.recalculatePlotAreaPen = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculatePen = true;
this.addToRecalculate(); this.addToRecalculate();
}; };
CChartSpace.prototype.handleUpdateFill = function() CChartSpace.prototype.handleUpdateFill = function()
......
...@@ -174,6 +174,8 @@ CChartSpace.prototype.handleUpdateStyle = function() ...@@ -174,6 +174,8 @@ CChartSpace.prototype.handleUpdateStyle = function()
this.recalcInfo.recalculateLegend = true; this.recalcInfo.recalculateLegend = true;
this.recalcInfo.recalculatePlotAreaBrush = true; this.recalcInfo.recalculatePlotAreaBrush = true;
this.recalcInfo.recalculatePlotAreaPen = true; this.recalcInfo.recalculatePlotAreaPen = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculatePen = true;
this.addToRecalculate(); this.addToRecalculate();
}; };
CChartSpace.prototype.canGroup = CShape.prototype.canGroup; CChartSpace.prototype.canGroup = CShape.prototype.canGroup;
......
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