NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Legend showing XValues not Series Name if only 1 series shown

Offbeatmammal opened this issue · comments

(have also asked this on StackOverflow, not sure where is best)

If I have a graph with (say) two Series, and the legends showing the series names, if I hide one of the series:

NetOffice.PowerPointApi.Series sr = (NetOffice.PowerPointApi.Series)xob2.Chart.SeriesCollection(1);
sr.IsFiltered = true;

the legend changes from showing the expected remaining series name to show all of the series XValues - which isn't want we want, would like to retain just the one series name. Am I missing something obvious?

Worst case we can set the hasLegend to false and put a textbox there.

(note for various reasons we don't want to use the Excel workbooks, so would like to do this purely using the NetOffice.PowerPointApi capabilities)