Commit 4271a1db authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

настройки цветов для фона диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54191 954022d7-b5bf-4e40-9824-e11837661b57
parent 58e2faab
...@@ -97,8 +97,8 @@ CChartsDrawer.prototype = ...@@ -97,8 +97,8 @@ CChartsDrawer.prototype =
this.calcProp.series = chartProp.chart.plotArea.chart.series; this.calcProp.series = chartProp.chart.plotArea.chart.series;
//отрисовываем без пересчёта //отрисовываем без пересчёта
this.allAreaChart.draw(this.calcProp, cShapeDrawer); this.allAreaChart.draw(this.calcProp, cShapeDrawer, chartProp);
this.areaChart.draw(this.calcProp, cShapeDrawer); this.areaChart.draw(this.calcProp, cShapeDrawer, chartProp);
this.catAxisChart.draw(this.calcProp, cShapeDrawer, chartProp); this.catAxisChart.draw(this.calcProp, cShapeDrawer, chartProp);
this.valAxisChart.draw(this.calcProp, cShapeDrawer, chartProp); this.valAxisChart.draw(this.calcProp, cShapeDrawer, chartProp);
this.gridChart.draw(this.calcProp, cShapeDrawer, chartProp); this.gridChart.draw(this.calcProp, cShapeDrawer, chartProp);
...@@ -4567,15 +4567,18 @@ function allAreaChart() ...@@ -4567,15 +4567,18 @@ function allAreaChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cShapeDrawer = null;
this.chartSpace = null;
this.paths = null; this.paths = null;
} }
allAreaChart.prototype = allAreaChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartProp, cShapeDrawer, chartSpace)
{ {
this.chartProp = chartProp; this.chartProp = chartProp;
this.cShapeDrawer = cShapeDrawer; this.cShapeDrawer = cShapeDrawer;
this.chartSpace = chartSpace;
this._drawArea(); this._drawArea();
}, },
...@@ -4616,30 +4619,18 @@ allAreaChart.prototype = ...@@ -4616,30 +4619,18 @@ allAreaChart.prototype =
_drawArea: function() _drawArea: function()
{ {
var StrokeUniColor = new CUniColor().RGBA; var pen = this.chartSpace.pen;
var FillUniColor = new CUniColor().RGBA; var brush = this.chartSpace.brush;
FillUniColor.R = 255; this._drawPaths(this.paths, brush, pen);
FillUniColor.G = 255;
FillUniColor.B = 255;
var lineWidth = 1;
this._drawPath(this.paths, lineWidth, StrokeUniColor, FillUniColor);
}, },
_drawPath: function(path, lineWidth, StrokeUniColor, FillUniColor) _drawPaths: function(paths, brush, pen)
{
if(StrokeUniColor)
{ {
path.stroke = true; paths.stroke = true;
this.cShapeDrawer.StrokeWidth = lineWidth/(96/25.4);
this.cShapeDrawer.p_width(1000 * this.cShapeDrawer.StrokeWidth);
this.cShapeDrawer.StrokeUniColor = StrokeUniColor;
}
this.cShapeDrawer.FillUniColor = FillUniColor;
var cGeometry = new CGeometry2(); var cGeometry = new CGeometry2();
cGeometry.AddPath(path); this.cShapeDrawer.Clear();
this.cShapeDrawer.fromShape2({brush: brush, pen: pen} ,this.cShapeDrawer.Graphics, cGeometry);
cGeometry.AddPath(paths);
this.cShapeDrawer.draw(cGeometry); this.cShapeDrawer.draw(cGeometry);
} }
} }
...@@ -4649,15 +4640,18 @@ function areaChart() ...@@ -4649,15 +4640,18 @@ function areaChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cShapeDrawer = null;
this.chartSpace = null;
this.paths = null; this.paths = null;
} }
areaChart.prototype = areaChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartProp, cShapeDrawer, chartSpace)
{ {
this.chartProp = chartProp; this.chartProp = chartProp;
this.cShapeDrawer = cShapeDrawer; this.cShapeDrawer = cShapeDrawer;
this.chartSpace = chartSpace;
this._drawArea(); this._drawArea();
}, },
...@@ -4706,30 +4700,18 @@ areaChart.prototype = ...@@ -4706,30 +4700,18 @@ areaChart.prototype =
_drawArea: function() _drawArea: function()
{ {
var StrokeUniColor = null; var pen = this.chartSpace.chart.plotArea.pen;
var FillUniColor = new CUniColor().RGBA; var brush = this.chartSpace.chart.plotArea.brush;
FillUniColor.R = 255; this._drawPaths(this.paths, brush, pen);
FillUniColor.G = 255;
FillUniColor.B = 255;
var lineWidth = 1;
this._drawPath(this.paths, lineWidth, StrokeUniColor, FillUniColor);
}, },
_drawPath: function(path, lineWidth, StrokeUniColor, FillUniColor) _drawPaths: function(paths, brush, pen)
{
if(StrokeUniColor)
{ {
path.stroke = true; paths.stroke = true;
this.cShapeDrawer.StrokeWidth = lineWidth/(96/25.4);
this.cShapeDrawer.p_width(1000 * this.cShapeDrawer.StrokeWidth);
this.cShapeDrawer.StrokeUniColor = StrokeUniColor;
}
this.cShapeDrawer.FillUniColor = FillUniColor;
var cGeometry = new CGeometry2(); var cGeometry = new CGeometry2();
cGeometry.AddPath(path); this.cShapeDrawer.Clear();
this.cShapeDrawer.fromShape2({brush: brush, pen: pen} ,this.cShapeDrawer.Graphics, cGeometry);
cGeometry.AddPath(paths);
this.cShapeDrawer.draw(cGeometry); this.cShapeDrawer.draw(cGeometry);
} }
} }
......
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