Determine which Axis exists in the Chart with Golang via C++
Sometimes, users need to know if a particular axis exists in the chart. For example, they may want to know whether a Secondary Value Axis exists inside the chart or not. Some charts like Pie, PieExploded, PiePie, PieBar, Pie3D, Pie3DExploded, Doughnut, DoughnutExploded, etc. do not have an axis.
Aspose.Cells provides Chart.HasAxis(AxisType axisType, bool isPrimary) method to determine if the chart has a particular axis or not.
The following sample code demonstrates the use of Chart.HasAxis(AxisType axisType, bool isPrimary) to determine if 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, displaying True for Primary Category and Value axes and False for 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