Commit 69ef83c6 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35197

parent ac47c98e
......@@ -3448,7 +3448,9 @@ CChartSpace.prototype.checkEmptySeries = function()
}
return false;
};
for(var i = 0; i < series.length; ++i)
var nChartType = chart_type.getObjectType();
var nSeriesLength = (nChartType === AscDFH.historyitem_type_PieChart || nChartType === AscDFH.historyitem_type_DoughnutChart) ? 1 : series.length;
for(var i = 0; i < nSeriesLength; ++i)
{
var ser = series[i];
if(ser.val)
......@@ -5919,8 +5921,8 @@ CChartSpace.prototype.recalculateAxis = function()
cat_ax.labels.extY = max_rotated_height + labels_offset;
//
left_gap_point = Math.min.apply(Math, arr_left_points);
right_gap_point = Math.max.apply(Math, arr_right_points);
left_gap_point = Math.max(0, Math.min.apply(Math, arr_left_points));
right_gap_point = Math.max(0, Math.max.apply(Math, arr_right_points));
if(!bWithoutLabels){
if(AscFormat.ORIENTATION_MIN_MAX === cat_ax_orientation)
......@@ -8260,7 +8262,7 @@ CChartSpace.prototype.hitInTextRect = function()
legend_width = max_legend_width;
}
var max_entry_height2 = Math.max.apply(Math, arr_heights);
var max_entry_height2 = Math.max(0, Math.max.apply(Math, arr_heights));
for(i = 0; i < arr_heights.length; ++i)
arr_heights[i] = max_entry_height2;
......@@ -8348,7 +8350,7 @@ CChartSpace.prototype.hitInTextRect = function()
b_reverse_order = true;
}
var max_entry_height2 = Math.max.apply(Math, arr_heights);
var max_entry_height2 = Math.max(0, Math.max.apply(Math, arr_heights));
for(i = 0; i < arr_heights.length; ++i)
arr_heights[i] = max_entry_height2;
if(max_content_width < max_legend_width - left_inset)
......@@ -8480,7 +8482,7 @@ CChartSpace.prototype.hitInTextRect = function()
summ_width+=arr_width[arr_width.length-1];
}
var max_entry_height = Math.max.apply(Math, arr_height);
var max_entry_height = Math.max(0, Math.max.apply(Math, arr_height));
var cur_left_x = 0;
if(summ_width < max_legend_width)//значит все надписи убираются в одну строчку
......@@ -8680,7 +8682,7 @@ CChartSpace.prototype.hitInTextRect = function()
summ_width += arr_width[arr_width.length-1];
}
var max_entry_height = Math.max.apply(Math, arr_height);
var max_entry_height = Math.max(0, Math.max.apply(Math, arr_height));
var cur_left_x = 0;
if(summ_width < max_legend_width)//значит все надписи убираются в одну строчку
{
......@@ -8788,7 +8790,7 @@ CChartSpace.prototype.hitInTextRect = function()
max_content_width = cur_content_width;
arr_heights.push(calc_entry.txBody.getSummaryHeight());
}
max_entry_height = Math.max.apply(Math, arr_heights);
max_entry_height = Math.max(0, Math.max.apply(Math, arr_heights));
if(max_content_width < max_legend_width - left_inset && !bFixedSize)
{
legend_width = max_content_width + left_inset;
......
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