Commit 992f28b9 authored by Sergey Luzyanin's avatar Sergey Luzyanin

Поддержка свойств displayHidden и displayEmptyCellsAs

parent 475015a2
...@@ -2349,7 +2349,7 @@ CChartSpace.prototype = ...@@ -2349,7 +2349,7 @@ CChartSpace.prototype =
removePtsFromLit(num_cache); removePtsFromLit(num_cache);
} }
var lit_format_code = typeof num_cache.formatCode === "string" && num_cache.formatCode.length > 0 ? num_cache.formatCode : "General"; var lit_format_code = typeof num_cache.formatCode === "string" && num_cache.formatCode.length > 0 ? num_cache.formatCode : "General";
var pt_index = 0, i, j, cell, pt, worksheet_id, hidden = true, row_hidden, col_hidden, nPtCount; var pt_index = 0, i, j, cell, pt, worksheet_id, hidden = true, row_hidden, col_hidden, nPtCount, t;
for(i = 0; i < arr_f.length; ++i) for(i = 0; i < arr_f.length; ++i)
{ {
var parsed_ref = parserHelp.parse3DRef(arr_f[i]); var parsed_ref = parserHelp.parse3DRef(arr_f[i]);
...@@ -2364,6 +2364,7 @@ CChartSpace.prototype = ...@@ -2364,6 +2364,7 @@ CChartSpace.prototype =
{ {
var range = range1.bbox; var range = range1.bbox;
var nLastNoEmptyIndex = null, dLastNoEmptyVal = null, aSpanPoints = [];
if(range.r1 === range.r2 || bVertical === true) if(range.r1 === range.r2 || bVertical === true)
{ {
row_hidden = source_worksheet.getRowHidden(range.r1); row_hidden = source_worksheet.getRowHidden(range.r1);
...@@ -2384,25 +2385,39 @@ CChartSpace.prototype = ...@@ -2384,25 +2385,39 @@ CChartSpace.prototype =
} }
num_cache.addPt(pt); num_cache.addPt(pt);
} if(aSpanPoints.length > 0 )
else
{
if(isRealNumber(this.displayEmptyCellsAs))
{ {
switch (this.displayEmptyCellsAs) if(isRealNumber(nLastNoEmptyIndex))
{ {
case 0: var oStartPoint = num_cache.getPtByIndex(nLastNoEmptyIndex);
for(t = 0; t < aSpanPoints.length; ++i)
{ {
break;
} }
case 1:
{
break;
} }
case 2: aSpanPoints.length = 0;
}
nLastNoEmptyIndex = pt_index;
dLastNoEmptyVal = pt.val;
}
else
{ {
break; if(isRealNumber(this.displayEmptyCellsAs) && this.displayEmptyCellsAs !== 1)
{
if(this.displayEmptyCellsAs === 2)
{
pt = new CNumericPoint();
pt.setIdx(pt_index);
pt.setVal(0);
num_cache.addPt(pt);
} }
if(this.displayEmptyCellsAs === 0)
{
pt = new CNumericPoint();
pt.setIdx(pt_index);
pt.setVal(0);
num_cache.addPt(pt);
aSpanPoints.push(pt);
} }
} }
} }
......
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