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

флаг bEmtySeries у CChartSpace для диаграмм у которых не удалось набить серии.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57075 954022d7-b5bf-4e40-9824-e11837661b57
parent faaecdf7
......@@ -15619,6 +15619,10 @@ CNumericPoint.prototype =
setVal: function(pr)
{
var _pr = parseFloat(pr);
if(isNaN(_pr))
{
_pr = 0;
}
History.Add(this, {Type: historyitem_NumericPoint_SetVal, oldPr: this.val, newPr: _pr});
this.val = _pr;
},
......
......@@ -2626,10 +2626,56 @@ CChartSpace.prototype =
}
},
checkEmptySeries: function()
{
var chart_type = this.chart.plotArea.charts[0];
var series = chart_type.series;
var checkEmptyVal = function(val)
{
if(val.numRef)
{
if(!val.numRef.numCache)
return true;
if(val.numRef.numCache.pts.length === 0)
return true;
}
else if(val.numLit)
{
if(val.numLit.pts.length === 0)
return true;
}
else
{
return true;
}
return false;
};
for(var i = 0; i < series.length; ++i)
{
var ser = series[i];
if(ser.val)
{
if(!checkEmptyVal(ser.val))
return false;
}
if(ser.yVal)
{
if(!checkEmptyVal(ser.yVal))
return false;
}
}
return true;
},
recalculateAxis: function()
{
if(this.chart && this.chart.plotArea && this.chart.plotArea.chart)
{
var b_checkEmpty = this.checkEmptySeries();
this.bEmtySeries = b_checkEmpty;
if(b_checkEmpty)
return;
var plot_area = this.chart.plotArea;
var chart_object = plot_area.chart;
var i;
......
......@@ -115,7 +115,7 @@ CTableId.prototype =
{
Add: function(Class, Id, sheetId)
{
if ( false === this.m_bTurnOff )
if ( false === this.m_bTurnOff && Class.Write_ToBinary2)
{
Class.Id = Id;
this.m_aPairs[Id] = Class;
......
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