Commit 0032caa0 authored by GoshaZotov's avatar GoshaZotov

bug with line charts(max and min values)

parent b5455b05
...@@ -1178,6 +1178,7 @@ CChartsDrawer.prototype = ...@@ -1178,6 +1178,7 @@ CChartsDrawer.prototype =
var generateArrValues = function() var generateArrValues = function()
{ {
var isEn = false;
var numSeries = 0; var numSeries = 0;
for(var l = 0; l < series.length; l++) for(var l = 0; l < series.length; l++)
{ {
...@@ -1207,16 +1208,20 @@ CChartsDrawer.prototype = ...@@ -1207,16 +1208,20 @@ CChartsDrawer.prototype =
var val = curPoint.val; var val = curPoint.val;
var value = parseFloat(val); var value = parseFloat(val);
if(!isNaN(value))
if(!isEn && !isNaN(value))
{ {
if(value > max) min = value;
{ max = value;
max = value; isEn = true;
} }
if(value < min) if(!isNaN(value) && value > max)
{ {
min = value; max = value;
} }
if(!isNaN(value) && value < min)
{
min = value;
} }
if(isNaN(value) && val == '' && (((t.calcProp.type == c_oChartTypes.Line ) && t.calcProp.type == 'normal'))) if(isNaN(value) && val == '' && (((t.calcProp.type == c_oChartTypes.Line ) && t.calcProp.type == 'normal')))
......
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