Commit 1efa6b83 authored by Sergey Luzyanin's avatar Sergey Luzyanin

remove legend entry

parent e44555b8
......@@ -1558,23 +1558,14 @@ CChartSpace.prototype.clearFormatting = function(bNoClearShapeProps)
}
else
{
var aCalcEntries = this.selection.legend.calcEntryes;
var idx;
if(aCalcEntries && aCalcEntries[this.selection.legendEntry])
var entry = this.selection.legend.findLegendEntryByIndex(this.selection.legendEntry);
if(!entry)
{
idx = aCalcEntries[this.selection.legendEntry].idx;
}
if(AscFormat.isRealNumber(idx))
{
var entry = this.selection.legend.findLegendEntryByIndex(idx);
if(!entry)
{
entry = new AscFormat.CLegendEntry();
entry.setIdx(idx);
this.selection.legend.addLegendEntry(entry);
}
entry.setDelete(true);
entry = new AscFormat.CLegendEntry();
entry.setIdx(this.selection.legendEntry);
this.selection.legend.addLegendEntry(entry);
}
entry.setDelete(true);
}
}
else if(this.selection.axisLbls)
......
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