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
}
else {
val_ax_props.putMinValRule(c_oAscValAxisRule.auto);
if (c_oAscChartTypeSettings.lineNormal === settings.type) {
for (i = 0; i < aSeriesPoints.length; ++i) {
if (fMinVal === null) {
fMinVal = aSeriesPoints[i].val;
......@@ -694,14 +694,12 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
}
}
}
}
if (oSparklineGroup.asc_getMaxAxisType() === Asc.c_oAscSparklineAxisMinMax.Custom && oSparklineGroup.asc_getManualMax() !== null) {
val_ax_props.putMinValRule(c_oAscValAxisRule.fixed);
val_ax_props.putMinVal(oSparklineGroup.asc_getManualMax());
}
else {
val_ax_props.putMaxValRule(c_oAscValAxisRule.auto);
if (c_oAscChartTypeSettings.lineNormal === settings.type) {
for (i = 0; i < aSeriesPoints.length; ++i) {
if (fMaxVal === null) {
fMaxVal = aSeriesPoints[i].val;
......@@ -712,7 +710,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
}
}
}
}
if (fMinVal !== null && fMaxVal !== null) {
if (fMinVal !== fMaxVal) {
val_ax_props.putMinValRule(c_oAscValAxisRule.fixed);
......@@ -862,15 +859,6 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
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)
{
......@@ -930,6 +918,17 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
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