Find if Data Points are in the Second Pie or Bar on a Pie of Pie or Bar of Pie Chart

Possible Usage Scenarios

You can find whether data points of a series are in the second pie of a Pie of Pie chart or in the bar of a Bar of Pie chart using Aspose.Cells. Please use the ChartPoint.IsInSecondaryPlot property to determine this.

Please download the sample Excel file used in the following sample code and see its console output. If you open the sample Excel file, you will find that all the data points that are less than 10 are inside the bar of the Bar of Pie chart, as also shown by the console output.

Find if Data Points are in the Second Pie or Bar on a Pie of Pie or Bar of Pie Chart

The following sample code shows how to find if data points are in the second pie or bar on a Pie of Pie or Bar of Pie chart.

Console Output

Please see the following console output generated after the execution of the above sample code with the sample Excel file. If IsInSecondaryPlot is false, the data point is inside the pie, and if it is true, then the data point is inside the bar.

 Value: 15

IsInSecondaryPlot: False

Value: 9

IsInSecondaryPlot: True

Value: 2

IsInSecondaryPlot: True

Value: 40

IsInSecondaryPlot: False

Value: 5

IsInSecondaryPlot: True

Value: 4

IsInSecondaryPlot: True

Value: 25

IsInSecondaryPlot: False