Commit d93e452b authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 33668

parent f4918ff7
...@@ -3037,7 +3037,8 @@ CChartSpace.prototype.checkValByNumRef = function(workbook, ser, val, bVertical) ...@@ -3037,7 +3037,8 @@ CChartSpace.prototype.checkValByNumRef = function(workbook, ser, val, bVertical)
if(!row_hidden && !source_worksheet.getColHidden(j) || (this.displayHidden === true)) if(!row_hidden && !source_worksheet.getColHidden(j) || (this.displayHidden === true))
{ {
cell = source_worksheet.getCell3(range.r1, j); cell = source_worksheet.getCell3(range.r1, j);
var value = parseFloat(cell.getValue()); var sCellValue = cell.getValue();
var value = parseFloat(sCellValue);
if(AscFormat.isRealNumber(value)) if(AscFormat.isRealNumber(value))
{ {
hidden = false; hidden = false;
...@@ -3071,14 +3072,30 @@ CChartSpace.prototype.checkValByNumRef = function(workbook, ser, val, bVertical) ...@@ -3071,14 +3072,30 @@ CChartSpace.prototype.checkValByNumRef = function(workbook, ser, val, bVertical)
{ {
if(AscFormat.isRealNumber(this.displayEmptyCellsAs) && this.displayEmptyCellsAs !== 1) if(AscFormat.isRealNumber(this.displayEmptyCellsAs) && this.displayEmptyCellsAs !== 1)
{ {
if(this.displayEmptyCellsAs === 2) if(this.displayEmptyCellsAs === 2 || ((typeof sCellValue === "string") && sCellValue.length > 0))
{ {
pt = new AscFormat.CNumericPoint(); pt = new AscFormat.CNumericPoint();
pt.setIdx(pt_index); pt.setIdx(pt_index);
pt.setVal(0); pt.setVal(0);
num_cache.addPt(pt); num_cache.addPt(pt);
if(aSpanPoints.length > 0 )
{
if(AscFormat.isRealNumber(nLastNoEmptyIndex))
{
var oStartPoint = num_cache.getPtByIndex(nLastNoEmptyIndex);
for(t = 0; t < aSpanPoints.length; ++t)
{
aSpanPoints[t].val = oStartPoint.val + ((pt.val - oStartPoint.val)/(aSpanPoints.length + 1))*(t+1);
num_cache.pts.splice(nSpliceIndex + t, 0, aSpanPoints[t]);
}
}
aSpanPoints.length = 0;
}
nLastNoEmptyIndex = pt_index;
nSpliceIndex = num_cache.pts.length;
dLastNoEmptyVal = pt.val;
} }
if(this.displayEmptyCellsAs === 0) else if(this.displayEmptyCellsAs === 0 && ser.getObjectType() === AscDFH.historyitem_type_LineSeries)
{ {
pt = new AscFormat.CNumericPoint(); pt = new AscFormat.CNumericPoint();
pt.setIdx(pt_index); pt.setIdx(pt_index);
......
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