Commit 475015a2 authored by Sergey Luzyanin's avatar Sergey Luzyanin

Поддержка пустых значений

parent aaac5f30
......@@ -417,6 +417,33 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
chart_space.setBDeleted(false);
chart_space.setWorksheet(worksheetView.model);
chart_space.displayHidden = oSparklineGroup.displayHidden;
chart_space.displayEmptyCellsAs = oSparklineGroup.displayEmptyCellsAs;
if(isRealNumber(oSparklineGroup.displayEmptyCellsAs))
{
switch(oSparklineGroup.displayEmptyCellsAs)
{
case Asc.EDispBlanksAs.Span:
{
chart_space.displayEmptyCellsAs = 0;
break;
}
case Asc.EDispBlanksAs.Gap:
{
chart_space.displayEmptyCellsAs = 1;
break;
}
case Asc.EDispBlanksAs.Zero:
{
chart_space.displayEmptyCellsAs = 2;
break;
}
}
chart_space.displayHidden = oSparklineGroup.displayHidden;
}
settings.putTitle(c_oAscChartTitleShowSettings.none);
settings.putHorAxisLabel(c_oAscChartTitleShowSettings.none);
......
......@@ -2369,7 +2369,7 @@ CChartSpace.prototype =
row_hidden = source_worksheet.getRowHidden(range.r1);
for(j = range.c1; j <= range.c2; ++j)
{
if(!row_hidden && !source_worksheet.getColHidden(j))
if(!row_hidden && !source_worksheet.getColHidden(j) || (this.displayHidden === true))
{
cell = source_worksheet.getCell3(range.r1, j);
if(typeof cell.getValueWithFormat() === "string" && cell.getValueWithFormat().length > 0)
......@@ -2385,6 +2385,27 @@ CChartSpace.prototype =
num_cache.addPt(pt);
}
else
{
if(isRealNumber(this.displayEmptyCellsAs))
{
switch (this.displayEmptyCellsAs)
{
case 0:
{
break;
}
case 1:
{
break;
}
case 2:
{
break;
}
}
}
}
}
pt_index++;
}
......@@ -2394,7 +2415,7 @@ CChartSpace.prototype =
col_hidden = source_worksheet.getColHidden(range.c1);
for(j = range.r1; j <= range.r2; ++j)
{
if(!col_hidden && !source_worksheet.getRowHidden(j))
if(!col_hidden && !source_worksheet.getRowHidden(j) || (this.displayHidden === true))
{
cell = source_worksheet.getCell3(j, range.c1);
if(typeof cell.getValueWithFormat() === "string" && cell.getValueWithFormat().length > 0)
......
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