Commit a651ec39 authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 33612

parent 95f71751
...@@ -682,7 +682,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -682,7 +682,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
} }
else { else {
val_ax_props.putMinValRule(c_oAscValAxisRule.auto); val_ax_props.putMinValRule(c_oAscValAxisRule.auto);
if (c_oAscChartTypeSettings.lineNormal === settings.type) {
for (i = 0; i < aSeriesPoints.length; ++i) { for (i = 0; i < aSeriesPoints.length; ++i) {
if (fMinVal === null) { if (fMinVal === null) {
fMinVal = aSeriesPoints[i].val; fMinVal = aSeriesPoints[i].val;
...@@ -693,7 +693,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -693,7 +693,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
} }
} }
} }
}
} }
if (oSparklineGroup.asc_getMaxAxisType() === Asc.c_oAscSparklineAxisMinMax.Custom && oSparklineGroup.asc_getManualMax() !== null) { if (oSparklineGroup.asc_getMaxAxisType() === Asc.c_oAscSparklineAxisMinMax.Custom && oSparklineGroup.asc_getManualMax() !== null) {
val_ax_props.putMinValRule(c_oAscValAxisRule.fixed); val_ax_props.putMinValRule(c_oAscValAxisRule.fixed);
...@@ -701,17 +700,15 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -701,17 +700,15 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
} }
else { else {
val_ax_props.putMaxValRule(c_oAscValAxisRule.auto); val_ax_props.putMaxValRule(c_oAscValAxisRule.auto);
if (c_oAscChartTypeSettings.lineNormal === settings.type) { for (i = 0; i < aSeriesPoints.length; ++i) {
for (i = 0; i < aSeriesPoints.length; ++i) { if (fMaxVal === null) {
if (fMaxVal === null) { fMaxVal = aSeriesPoints[i].val;
fMaxVal = aSeriesPoints[i].val; } else {
} else { if (fMaxVal < aSeriesPoints[i].val) {
if (fMaxVal < aSeriesPoints[i].val) { fMaxVal = aSeriesPoints[i].val;
fMaxVal = aSeriesPoints[i].val; }
} }
} }
}
}
} }
if (fMinVal !== null && fMaxVal !== null) { if (fMinVal !== null && fMaxVal !== null) {
if (fMinVal !== fMaxVal) { if (fMinVal !== fMaxVal) {
...@@ -862,15 +859,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -862,15 +859,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
if(fCallbackSeries) if(fCallbackSeries)
{ {
if(nSparklineType !== Asc.c_oAscSparklineType.Line){
for(i = 0; i < aSeriesPoints.length; ++i)
{
if(AscFormat.fApproxEqual(aSeriesPoints[i].val, 0))
{
fCallbackSeries(oSerie, aSeriesPoints[i].idx, null);
}
}
}
if(oSparklineGroup.negative && oSparklineGroup.colorNegative) if(oSparklineGroup.negative && oSparklineGroup.colorNegative)
{ {
...@@ -930,6 +918,17 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -930,6 +918,17 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
fCallbackSeries(oSerie, aMinPoints[i].idx, oSparklineGroup.colorLow); fCallbackSeries(oSerie, aMinPoints[i].idx, oSparklineGroup.colorLow);
} }
} }
if(nSparklineType !== Asc.c_oAscSparklineType.Line){
for(i = 0; i < aSeriesPoints.length; ++i)
{
if(AscFormat.fApproxEqual(aSeriesPoints[i].val, 0))
{
fCallbackSeries(oSerie, aSeriesPoints[i].idx, null);
}
}
}
} }
} }
......
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