Commit aaac5f30 authored by Sergey Luzyanin's avatar Sergey Luzyanin

Сортируем точки в серии по возрастанию

parent 2c71f105
......@@ -646,7 +646,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
else
{
aSeriesPoints.sort(function(a, b){return b.val - a.val;});
aSeriesPoints.sort(function(a, b){return a.val - b.val;});
bSorted = true;
dMinVal = aSeriesPoints[0].val;
}
......@@ -666,7 +666,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
{
if(!bSorted)
{
aSeriesPoints.sort(function(a, b){return b.val - a.val;});
aSeriesPoints.sort(function(a, b){return a.val - b.val;});
bSorted = true;
}
dMaxVal = aSeriesPoints[aSeriesPoints.length - 1].val;
......@@ -794,7 +794,7 @@ CSparklineView.prototype.setMinMaxValAx = function(minVal, maxVal, oSparklineGro
var dMinVal, dMaxVal, bSorted = false;
if(minVal == null)
{
aSeriesPoints.sort(function(a, b){return b.val - a.val;});
aSeriesPoints.sort(function(a, b){return a.val - b.val;});
bSorted = true;
dMinVal = aSeriesPoints[0].val;
}
......@@ -807,7 +807,7 @@ CSparklineView.prototype.setMinMaxValAx = function(minVal, maxVal, oSparklineGro
{
if(!bSorted)
{
aSeriesPoints.sort(function(a, b){return b.val - a.val;});
aSeriesPoints.sort(function(a, b){return a.val - b.val;});
bSorted = true;
}
dMaxVal = aSeriesPoints[aSeriesPoints.length - 1].val;
......
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