Commit 613522e3 authored by Alexander.Trofimov's avatar Alexander.Trofimov

asc_getDisplayEmpty return displayEmptyCellsAs or default if not exist

parent 389cc7eb
...@@ -4835,7 +4835,7 @@ CellArea.prototype = { ...@@ -4835,7 +4835,7 @@ CellArea.prototype = {
return this.lineWeight; return this.lineWeight;
}; };
sparklineGroup.prototype.asc_getDisplayEmpty = function () { sparklineGroup.prototype.asc_getDisplayEmpty = function () {
return this.displayEmptyCellsAs; return null !== this.displayEmptyCellsAs ? this.displayEmptyCellsAs : Asc.c_oAscEDispBlanksAs.Zero;
}; };
sparklineGroup.prototype.asc_getMarkersPoint = function () { sparklineGroup.prototype.asc_getMarkersPoint = function () {
return this.markers; return this.markers;
......
...@@ -662,27 +662,22 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -662,27 +662,22 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
chart_space.displayHidden = oSparklineGroup.displayHidden; chart_space.displayHidden = oSparklineGroup.displayHidden;
chart_space.displayEmptyCellsAs = oSparklineGroup.displayEmptyCellsAs; chart_space.displayEmptyCellsAs = oSparklineGroup.displayEmptyCellsAs;
var nDisplayEmptyCellsAs = AscFormat.isRealNumber(oSparklineGroup.displayEmptyCellsAs) ? oSparklineGroup.displayEmptyCellsAs : Asc.c_oAscEDispBlanksAs.Zero; switch(oSparklineGroup.asc_getDisplayEmpty())
if(AscFormat.isRealNumber(nDisplayEmptyCellsAs))
{ {
switch(oSparklineGroup.displayEmptyCellsAs) case Asc.c_oAscEDispBlanksAs.Span:
{ {
case Asc.c_oAscEDispBlanksAs.Span: chart_space.displayEmptyCellsAs = 0;
{ break;
chart_space.displayEmptyCellsAs = 0; }
break; case Asc.c_oAscEDispBlanksAs.Gap:
} {
case Asc.c_oAscEDispBlanksAs.Gap: chart_space.displayEmptyCellsAs = 1;
{ break;
chart_space.displayEmptyCellsAs = 1; }
break; case Asc.c_oAscEDispBlanksAs.Zero:
} {
case Asc.c_oAscEDispBlanksAs.Zero: chart_space.displayEmptyCellsAs = 2;
{ break;
chart_space.displayEmptyCellsAs = 2;
break;
}
} }
} }
chart_space.displayHidden = oSparklineGroup.displayHidden; chart_space.displayHidden = oSparklineGroup.displayHidden;
......
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