Commit db70c759 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@54589 954022d7-b5bf-4e40-9824-e11837661b57
parent 39255b8f
...@@ -10965,16 +10965,26 @@ CPlotArea.prototype = ...@@ -10965,16 +10965,26 @@ CPlotArea.prototype =
getAxisByTypes: function() getAxisByTypes: function()
{ {
//var ret = {valAx:[], catAx: [], dateAx: []}; var ret = {valAx:[], catAx: [], dateAx: []};
//for(var i = 0; i < this.axis.length; ++i) for(var i = 0; i < this.axis.length; ++i)
//{ {
// var axis = this.axis[i]; var axis = this.axis[i];
// switch(axis.getObjectType())
// switch(this.axi) {
//} case historyitem_type_CatAx:
//this.valAx = null; {
//this.catAx = null; ret.catAx.push(axis);
//this.dateAx = null; break;
}
case historyitem_type_ValAx:
{
ret.valAx.push(axis);
break;
}
//TODO DATE Axis
}
}
return ret;
}, },
Undo: function(data) Undo: function(data)
...@@ -13832,7 +13842,26 @@ CTitle.prototype = ...@@ -13832,7 +13842,26 @@ CTitle.prototype =
getCompiledLine: CDLbl.prototype.getCompiledLine, getCompiledLine: CDLbl.prototype.getCompiledLine,
getCompiledTransparent: CDLbl.prototype.getCompiledTransparent, getCompiledTransparent: CDLbl.prototype.getCompiledTransparent,
Get_Styles: CDLbl.prototype.Get_Styles, Get_Styles: CDLbl.prototype.Get_Styles,
draw: CDLbl.prototype.draw, draw: function(graphics)
{
if(this.chart)
{
graphics.SetIntegerGrid(false);
graphics.p_width(70);
graphics.transform3(this.chart.transform, false);
graphics.p_color(0, 0, 0, 255);
graphics._s();
graphics._m(this.x, this.y);
graphics._l(this.x + this.extX, this.y + 0);
graphics._l(this.x + this.extX, this.y + this.extY);
graphics._l(this.x + 0, this.y + this.extY);
graphics._z();
graphics.ds();
graphics.SetIntegerGrid(true);
}
CDLbl.prototype.draw.call(this, graphics);
},
isEmptyPlaceholder: CDLbl.prototype.isEmptyPlaceholder, isEmptyPlaceholder: CDLbl.prototype.isEmptyPlaceholder,
recalculatePen: CShape.prototype.recalculatePen, recalculatePen: CShape.prototype.recalculatePen,
......
...@@ -713,8 +713,6 @@ CChartSpace.prototype.recalculateSeriesColors = function() ...@@ -713,8 +713,6 @@ CChartSpace.prototype.recalculateSeriesColors = function()
{ {
var style = CHART_STYLE_MANAGER.getStyleByIndex(this.style); var style = CHART_STYLE_MANAGER.getStyleByIndex(this.style);
var series = this.chart.plotArea.chart.series; var series = this.chart.plotArea.chart.series;
var parents = this.getParentObjects(); var parents = this.getParentObjects();
var RGBA = {R: 0, G: 0, B: 0, A: 255}; var RGBA = {R: 0, G: 0, B: 0, A: 255};
if(this.chart.plotArea.chart.varyColors && series.length === 1 || this.chart.plotArea.chart instanceof CPieChart) if(this.chart.plotArea.chart.varyColors && series.length === 1 || this.chart.plotArea.chart instanceof CPieChart)
...@@ -2229,9 +2227,46 @@ CChartSpace.prototype.recalculateAxis = function() ...@@ -2229,9 +2227,46 @@ CChartSpace.prototype.recalculateAxis = function()
} }
else if(chart_type === historyitem_type_BarChart && chart_object.barDir === BAR_DIR_BAR) else if(chart_type === historyitem_type_BarChart && chart_object.barDir === BAR_DIR_BAR)
{ {
//var cat_ax, val_ax; var cat_ax, val_ax;
//var axis_arr = plot_area.axis; var axis_by_types = plot_area.getAxisByTypes();
//for(i = 0; i < axis_arr.length; ++a) cat_ax = axis_by_types.catAx[0];
val_ax = axis_by_types.valAx[0];
if(cat_ax && val_ax)
{
var sizes = this.getChartSizes();
var rect = {x: sizes.startX, y:sizes.startY, w:sizes.w, h: sizes.h};
//расчитаем подписи для вертикальной оси
var hor_gap = 4;//пока 4mm
var ser = chart_object.series[0];
var string_pts = [], pts_len = 0;
if(ser && ser.cat)
{
if(ser.cat.strRef && ser.cat.strRef.strCache)
{
string_pts = ser.cat.strRef.strCache.pt;
pts_len = string_pts.length;
}
else if(ser.cat.strLit)
{
string_pts = ser.cat.strLit.pt;
pts_len = string_pts.length;
}
}
if(string_pts.length === 0)
{
if(ser.val)
{
if(ser.val.numRef && ser.val.numRef.numCache)
pts_len = ser.val.numRef.numCache.pts.length;
else if(ser.val.numLit)
pts_len = ser.val.numLit.pts.length;
}
for(i = 0; i < pts_len; ++i)
{
string_pts.push({val:i+1 + ""});
}
}
}
} }
} }
}; };
......
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