Commit b4801699 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@49258 954022d7-b5bf-4e40-9824-e11837661b57
parent 01cc6bf3
......@@ -763,11 +763,20 @@ function calcAllMargin(isFormatCell,isformatCellScOy,minX,maxX,minY,maxY, chart)
var widthText = getMaxPropertiesText(context,font,bar._otherProps._key);
var widthKey = widthText.width/scale + 2 + widthLine;
//в MSExcel справа от легенды всегда остаётся такой маргин
var maxWidthLegendLeftOrRight = chartCanvas.width/3;//максимальный размер легенды - временно!
if(widthKey > maxWidthLegendLeftOrRight)//в данном случае легенду рисуем поверх
{
chart.legend.bOverlay = true;
}
else
{
if(bar._otherProps._key_halign == 'left')
left += widthKey + 7;
else
right += widthKey + 7;
}
}
if(!chart.margins.key)
chart.margins.key = {};
chart.margins.key.h = heigthTextKey;
......
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