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

remove legend entry

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