I am working On Charts and I am having this requirement.
I have done with creating chart but my problem is I want to apply chart styles through coding.
I am working on Pie chart.
Now if you open Excel sheet and go to chart tools --> there will be three tabbs below that . Click on Design tab -- > you will see chart style block.In that block the style 2 or the second diagram of pie is there..
I want my pie chart to look like that.
how to apply this chart style to my pie chart through coding.
Please use the following code snippet to generate the Pie chart as desired. If there is any thing which need clarification, please feel free to reach us.
Please use the Chart.Style property to set the style of the chart. Please see the following sample code that explains how to make use of this property. I have also attached the source excel file used in this code and the output excel file generated by it for your reference.
What you can do is to manually apply your chart style using Microsoft Excel and save the workbook on disk. Then load the same workbook using Aspose.Cells API and check the Chart.Style number. It will tell you which number value refers to which chart style.Mostly these numbers are in sequence, 1 means Style 1, 2 means Style 2 and 3 means Style 3 so on…
I have tested this issue with the latest version: Aspose.Cells for .NET (Latest Version) with the following sample code and it is giving correct results.
I changed the chart style to style 1 and it printed 1, then I changed the chart style to style 4 and it printed 4, so it is working fine.
We were able to observe this issue. When chart style is updated with Excel 2013, then Chart.Style property
does not change. However, when Chart Style is updated with Excel 2010,
then Chart.Style property does change.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
CELLSNET-43844 - Chart.Style number does not change when chart style is updated with Excel 2013
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.