OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
OpenXLSX::XLAxis Class Reference

#include <XLChart.hpp>

Public Member Functions

 XLAxis ()=default
 XLAxis (const XMLNode &node)
void setTitle (std::string_view title)
void setMinBounds (double min)
void clearMinBounds ()
void setMaxBounds (double max)
void clearMaxBounds ()
void setMajorUnit (double unit)
 Set the major unit (interval between major tick marks) for the axis.
void setMinorUnit (double unit)
 Set the minor unit (interval between minor tick marks) for the axis.
void setLogScale (double base)
 Set the axis to use a logarithmic scale.
void setDateAxis (bool isDateAxis)
 Convert this axis to a date axis or back to a category axis.
void setOrientation (XLAxisOrientation orientation)
 Set the orientation of the axis (normal or reverse).
void setCrosses (XLAxisCrosses crosses)
 Set the axis crossing mode.
void setCrossesAt (double value)
 Set the axis to cross at a specific value.
void setMajorGridlines (bool show)
void setMinorGridlines (bool show)
void setNumberFormat (std::string_view formatCode, bool sourceLinked=false)
 Set the number format for axis tick labels.
void setTickLabelPosition (XLAxisTickLabelPosition position)

Constructor & Destructor Documentation

◆ XLAxis() [1/2]

OpenXLSX::XLAxis::XLAxis ( )
default

◆ XLAxis() [2/2]

XLAxis::XLAxis ( const XMLNode & node)
explicit

Member Function Documentation

◆ clearMaxBounds()

void XLAxis::clearMaxBounds ( )

◆ clearMinBounds()

void XLAxis::clearMinBounds ( )

◆ setCrosses()

void XLAxis::setCrosses ( XLAxisCrosses crosses)

Set the axis crossing mode.

Parameters
crossesXLAxisCrosses::AutoZero, XLAxisCrosses::Min, or XLAxisCrosses::Max.

◆ setCrossesAt()

void XLAxis::setCrossesAt ( double value)

Set the axis to cross at a specific value.

Parameters
valueThe value at which the axis should cross.

◆ setDateAxis()

void XLAxis::setDateAxis ( bool isDateAxis)

Convert this axis to a date axis or back to a category axis.

Parameters
isDateAxisIf true, the axis becomes a c:dateAx. If false, it reverts to c:catAx.

◆ setLogScale()

void XLAxis::setLogScale ( double base)

Set the axis to use a logarithmic scale.

Parameters
baseThe base of the logarithm (e.g. 10). If 0 or less, the logarithmic scale is removed.

◆ setMajorGridlines()

void XLAxis::setMajorGridlines ( bool show)

◆ setMajorUnit()

void XLAxis::setMajorUnit ( double unit)

Set the major unit (interval between major tick marks) for the axis.

Parameters
unitThe unit value.

◆ setMaxBounds()

void XLAxis::setMaxBounds ( double max)

◆ setMinBounds()

void XLAxis::setMinBounds ( double min)

◆ setMinorGridlines()

void XLAxis::setMinorGridlines ( bool show)

◆ setMinorUnit()

void XLAxis::setMinorUnit ( double unit)

Set the minor unit (interval between minor tick marks) for the axis.

Parameters
unitThe unit value.

◆ setNumberFormat()

void XLAxis::setNumberFormat ( std::string_view formatCode,
bool sourceLinked = false )

Set the number format for axis tick labels.

Parameters
formatCodeExcel number format code, e.g. "0.00%" or "#,##0".
sourceLinkedIf true, the format follows the source data format.

◆ setOrientation()

void XLAxis::setOrientation ( XLAxisOrientation orientation)

Set the orientation of the axis (normal or reverse).

Parameters
orientationXLAxisOrientation::MinMax (normal) or XLAxisOrientation::MaxMin (reverse).

◆ setTickLabelPosition()

void XLAxis::setTickLabelPosition ( XLAxisTickLabelPosition position)

◆ setTitle()

void XLAxis::setTitle ( std::string_view title)

The documentation for this class was generated from the following files:
  • /home/runner/work/OpenXLSX-NX/OpenXLSX-NX/OpenXLSX/headers/XLChart.hpp
  • /home/runner/work/OpenXLSX-NX/OpenXLSX-NX/OpenXLSX/sources/XLChart.cpp