Determine which Axis exists in the Chart

The following sample code demonstrates the use of Chart.has_axis(AxisType axis_type, bool is_primary) to determine whether the sample chart has primary and secondary category and value axes.

C# code to determine which axis exists in the chart

Console output generated by the sample code

The console output of the code is shown below, which displays True for the primary category and value axes and False for the secondary category and value axes.

Has Primary Category Axis: True

Has Secondary Category Axis: False

Has Primary Value Axis: True

Has Secondary Value Axis: False