Commit b689e490 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

добавил обработку для логарифмической шкалы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55053 954022d7-b5bf-4e40-9824-e11837661b57
parent bea8be6c
......@@ -2470,6 +2470,12 @@ CChartsDrawer.prototype =
//chartProp.chart.plotArea.valAx.scaling.logBase
var axisMin, axisMax, firstDegree, step, arrayValues;
if(chartProp.chart.plotArea.valAx.scaling.logBase)
{
arrayValues = this._getLogArray(yMin, yMax, chartProp.chart.plotArea.valAx.scaling.logBase);
return arrayValues;
}
chartProp.chart.plotArea.valAx && chartProp.chart.plotArea.valAx.scaling ? chartProp.chart.plotArea.valAx.scaling.max : null;
//максимальное и минимальное значение(по документации excel)
var trueMinMax = this._getTrueMinMax(isOx, yMin, yMax);
......@@ -2524,6 +2530,25 @@ CChartsDrawer.prototype =
return arrayValues;
},
_getLogArray: function(yMin, yMax, logBase)
{
var result = [];
var temp;
var pow = 0;
if(logBase < 1)
logBase = 2;
while(temp <= yMax)
{
temp = Math.pow(logBase, pow);
result[pow] = temp;
pow ++;
};
return result;
},
_getArrayAxisValues: function(minUnit, axisMin, axisMax, step, manualMin, manualMax)
{
var arrayValues = [];
......
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