Commit 242167a8 authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix calculating bestfit position datalabels

parent 789347ec
...@@ -7916,6 +7916,16 @@ drawPieChart.prototype = ...@@ -7916,6 +7916,16 @@ drawPieChart.prototype =
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX); oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX);
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - (1 - fLengthCoeff)*fLabelHeight; oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - (1 - fLengthCoeff)*fLabelHeight;
} }
else if(oSolvation.x1 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x1*(fXs - fCenterX);
oResult.fY = fCenterY + oSolvation.x1*(fYs - fCenterY) - (1 - fLengthCoeff)*fLabelHeight;
}
else if(oSolvation.x2 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX);
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - (1 - fLengthCoeff)*fLabelHeight;
}
} }
break; break;
} }
...@@ -7944,6 +7954,16 @@ drawPieChart.prototype = ...@@ -7944,6 +7954,16 @@ drawPieChart.prototype =
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - fLabelWidth*fLengthCoeff; oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - fLabelWidth*fLengthCoeff;
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY); oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY);
} }
else if(oSolvation.x1 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x1*(fXs - fCenterX) - fLabelWidth*fLengthCoeff;
oResult.fY = fCenterY + oSolvation.x1*(fYs - fCenterY);
}
else if(oSolvation.x2 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - fLabelWidth*fLengthCoeff;
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY);
}
} }
break; break;
} }
...@@ -7973,6 +7993,17 @@ drawPieChart.prototype = ...@@ -7973,6 +7993,17 @@ drawPieChart.prototype =
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - fLabelWidth; oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - fLabelWidth;
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - fLabelHeight*fLengthCoeff; oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - fLabelHeight*fLengthCoeff;
} }
else if(oSolvation.x1 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x1*(fXs - fCenterX) - fLabelWidth;
oResult.fY = fCenterY + oSolvation.x1*(fYs - fCenterY) - fLabelHeight*fLengthCoeff;
}
else if(oSolvation.x2 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - fLabelWidth;
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - fLabelHeight*fLengthCoeff;
}
} }
break; break;
} }
...@@ -7997,6 +8028,16 @@ drawPieChart.prototype = ...@@ -7997,6 +8028,16 @@ drawPieChart.prototype =
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - (1 - fLengthCoeff)*fLabelWidth; oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - (1 - fLengthCoeff)*fLabelWidth;
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - fLabelHeight; oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - fLabelHeight;
} }
else if(oSolvation.x1 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x1*(fXs - fCenterX) - (1 - fLengthCoeff)*fLabelWidth;
oResult.fY = fCenterY + oSolvation.x1*(fYs - fCenterY) - fLabelHeight;
}
else if(oSolvation.x2 >= 0){
oResult.bError = false;
oResult.fX = fCenterX + oSolvation.x2*(fXs - fCenterX) - (1 - fLengthCoeff)*fLabelWidth;
oResult.fY = fCenterY + oSolvation.x2*(fYs - fCenterY) - fLabelHeight;
}
} }
break; break;
} }
......
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