Find Type of X and Y Values of Points in Chart Series

Possible Usage Scenarios

Sometimes, you want to know the type of X and Y values of chart points in a series. Aspose.Cells provides the ChartPoint.XValueType and ChartPoint.YValueType properties that can be used for this purpose. Please note that you will have to call the Chart.Calculate() method before you can use these properties effectively.

Find Type of X and Y Values of Points in Chart Series

The following sample code loads the sample Excel file and accesses the first chart in the first worksheet. It then calls the Chart.Calculate() method, finds the type of X and Y values of the first chart point, and prints them to the console. Please see the console output shown below for reference.

Sample Code

Console Output

 X Value Type: IsString

Y Value Type: IsNumeric