Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145408 | Jun 19,2019 04:52 PM UTC | Jun 20,2019 11:24 AM UTC | WinForms | 3 |
![]() |
Tags: Presentation |
//Opens a Presentation
IPresentation presentation = Presentation.Open(@"Chart.pptx");
//Gets the first slide
ISlide slide = presentation.Slides[0];
//Gets the chart in slide
IPresentationChart chart = slide.Charts[0];
//Iterate each series in the chart
for (int i = 0; i < chart.Series.Count; i++)
{
//Get or set a value indicates whether to display a chart data label values
chart.Series[i].DataPoints.DefaultDataPoint.DataLabels.IsValue = false;
}
//Save the PowerPoint presentation presentation.Save("Output.pptx");
|
//Opens a Presentation
IPresentation presentation = Presentation.Open(@"Chart.pptx");
//Gets the first slide
ISlide slide = presentation.Slides[0];
//Gets the chart in slide
IPresentationChart chart = slide.Charts[0];
//Iterate each series in the chart
for (int i = 0; i < chart.Series.Count; i++)
{
//Get or set a value indicates whether to display a chart data label values
chart.Series[i].DataPoints.DefaultDataPoint.DataLabels.IsValue = false;
//Gets each DataPoint from the DataPoint collection foreach(IOfficeChartDataPoint dataPoint in chart.Series[i].DataPoints)
{
//Get or set a value indicates whether to display a chart data label values
dataPoint.DataLabels.IsValue = false;
}
}
//Save the PowerPoint presentation presentation.Save("Output.pptx");
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.