-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from snehasf3509/master
ES-868612 Sample to enable ShowLeaderLines for a chart in a PPTX
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.7.34031.279 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Show-Leader-Lines", "Show-Leader-Lines\Show-Leader-Lines.csproj", "{81CC17C3-31B4-432C-81E3-73D893AEC61B}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{81CC17C3-31B4-432C-81E3-73D893AEC61B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{81CC17C3-31B4-432C-81E3-73D893AEC61B}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{81CC17C3-31B4-432C-81E3-73D893AEC61B}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{81CC17C3-31B4-432C-81E3-73D893AEC61B}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {628DABCE-496F-4F7C-9C10-F01B07445872} | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
32 changes: 32 additions & 0 deletions
32
Charts/Show-Leader-Lines/.NET/Show-Leader-Lines/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
| ||
using Syncfusion.OfficeChart; | ||
using Syncfusion.Presentation; | ||
|
||
namespace Format_Data_Labels | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"../../../Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); | ||
|
||
//Open an existing PowerPoint Presentation. | ||
using (IPresentation pptxDoc = Presentation.Open(fileStreamPath)) | ||
{ | ||
//Gets the first slide. | ||
ISlide slide = pptxDoc.Slides[0]; | ||
//Gets the chart in slide. | ||
IPresentationChart chart = slide.Charts[0]; | ||
|
||
//Show leader lines enabled | ||
chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.ShowLeaderLines = true; | ||
|
||
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"../../../Result.pptx"), FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite)) | ||
{ | ||
//Save the PowerPoint Presentation. | ||
pptxDoc.Save(outputStream); | ||
} | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Charts/Show-Leader-Lines/.NET/Show-Leader-Lines/Show-Leader-Lines.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<RootNamespace>Format_Data_Labels</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Presentation.Net.Core" Version="*" /> | ||
</ItemGroup> | ||
</Project> |