Commit 80e89b4c authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54803 954022d7-b5bf-4e40-9824-e11837661b57
parent a171ff94
......@@ -1384,13 +1384,10 @@ DrawingObjectsController.prototype =
if(isRealNumber(LEGEND_POS_MAP[legend_pos_settings]))
{
chart.legend.setLegendPos(LEGEND_POS_MAP[legend_pos_settings]);
if(legend_pos_settings === c_oAscChartLegendShowSettings.leftOverlay
|| legend_pos_settings === c_oAscChartLegendShowSettings.rightOverlay)
var b_overlay = c_oAscChartLegendShowSettings.leftOverlay === legend_pos_settings || legend_pos_settings === c_oAscChartLegendShowSettings.rightOverlay;
if(chart.legend.overlay !== b_overlay)
{
if(chart.legend.overlay !== true)
{
chart.legend.setOverlay(true);
}
chart.legend.setOverlay(b_overlay);
}
}
}
......@@ -1562,7 +1559,6 @@ DrawingObjectsController.prototype =
}
case historyitem_type_ScatterChart:
{
ne
break;
}
}
......@@ -1870,8 +1866,9 @@ DrawingObjectsController.prototype =
break;
}
case "Pie":
case "Doughnut":
{
return CreatePieChart(chart);
return CreatePieChart(chart, chart.type === "Doughnut");
}
case "Scatter":
{
......
......@@ -88,13 +88,16 @@ CPlotArea.prototype =
for(var j = 0; j < this.charts.length; ++j)
{
var other_chart = this.charts[j];
for(var k = 0; k < other_chart.axId.length; ++k)
if(Array.isArray(other_chart.axId))
{
if(other_chart.axId[k] === axis)
for(var k = 0; k < other_chart.axId.length; ++k)
{
if(other_chart.axId[k] === axis)
break;
}
if(k < other_chart.axId.length)
break;
}
if(k < other_chart.axId.length)
break;
}
if(j === this.charts.length)
this.removeAxis(axis);
......@@ -12765,8 +12768,8 @@ CScatterSeries.prototype =
this.setYVal(o.yVal);
if(o.cat)
{
//this.setXVal(new CXVal());
//this.xVal.setFromOtherObject(o.cat);
this.setXVal(new CXVal());
this.xVal.setFromOtherObject(o.cat);
}
if(o.val)
{
......
......@@ -2566,7 +2566,7 @@ function CreateAreaChart(asc_chart, type)
return chart_space;
}
function CreatePieChart(asc_chart, type)
function CreatePieChart(asc_chart, bDoughnut)
{
var asc_series = asc_chart.series;
var chart_space = new CChartSpace();
......@@ -2580,7 +2580,7 @@ function CreatePieChart(asc_chart, type)
chart.setPlotArea(new CPlotArea());
var plot_area = chart.plotArea;
plot_area.setLayout(new CLayout());
plot_area.addChart(new CPieChart());
plot_area.addChart(bDoughnut ? new CDoughnutChart() : new CPieChart());
var pie_chart = plot_area.charts[0];
pie_chart.setVaryColors(true);
var parsedHeaders = asc_chart.parseSeriesHeaders();
......@@ -2650,8 +2650,9 @@ function CreatePieChart(asc_chart, type)
pie_chart.dLbls.setShowPercent(false);
pie_chart.dLbls.setShowBubbleSize(false);
pie_chart.dLbls.setShowLeaderLines(true);
pie_chart.setFirstSliceAng(false);
pie_chart.setFirstSliceAng(0);
if(bDoughnut)
pie_chart.setHoleSize(50);
chart.setLegend(new CLegend());
var legend = chart.legend;
legend.setLegendPos(LEGEND_POS_R);
......
......@@ -2229,6 +2229,7 @@ Format
<option value='Pie'>Pie</option>
<option value='Scatter'>Scatter</option>
<option value='Stock'>Stock</option>
<option value='Doughnut'>Doughnut</option>
</select>
<select id='chartSubType' style='width: 320px; margin: 10px;'>
<option value='Normal' selected>Normal</option>
......
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