Does anybody know how to set the color of the slice/legend of a PowerPoint 2010 Pie Chart in C#? I can't make anything I read from the MSDN site work. I can't work out the proper way to get the correct object and property.
Edit: Well, I thought about adding code, but what I have is not working, so I wasn't sure how helpful or informative it would be. I can't figure out which object/method/property to use to get access to the pie chart slice color. I've tried Point, LegendKey, LegendEntry, Legend, and associated methods/properties with each. I've tried many things that aren't even represented in my code anymore.
But, for what it's worth, this is what my code is now:
PowerPoint.Series series = (PowerPoint.Series)xlChart.SeriesCollection(1);
PowerPoint.Point point = (PowerPoint.Point)series.Points(xlCol);
point.Interior.ColorIndex = Convert.ToInt32(dataArray[2, i]);
PowerPoint.Legend legend = (PowerPoint.Legend)xlChart.Legend;
PowerPoint.LegendEntry lentry = (PowerPoint.LegendEntry)legend.LegendEntries(1);