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

#include <XLChart.hpp>

Public Member Functions

 XLChartSeries ()=default
 XLChartSeries (const XMLNode &node)
XLChartSeries & setTitle (std::string_view title)
XLChartSeries & setSmooth (bool smooth)
XLChartSeries & setMarkerStyle (XLMarkerStyle style)
XLChartSeries & setColor (std::string_view hexRGB)
 Set the fill and line color of this data series.
XLChartSeries & setDataPointColor (uint32_t pointIdx, std::string_view hexRGB)
 Override the color of a single data point within this series.
XLChartSeries & setDataLabels (bool showValue, bool showCategoryName=false, bool showPercent=false)
 Enable and configure data labels for this series.
XLChartSeries & setDataLabelsFromRange (const XLWorksheet &wks, const XLCellRange &range)
 Set the data labels for this series to come from a worksheet range.
XLChartSeries & addTrendline (XLTrendlineType type, std::string_view name="", uint8_t order=2, uint8_t period=2)
 Add a trendline to this series.
XLChartSeries & addErrorBars (XLErrorBarDirection direction, XLErrorBarType type, XLErrorBarValueType valType, double value=0.0)
 Add error bars to this series.
XLChartSeries & setLineWidth (double points)
XLChartSeries & setLineDash (XLLineDashType dashType)

Constructor & Destructor Documentation

◆ XLChartSeries() [1/2]

OpenXLSX::XLChartSeries::XLChartSeries ( )
default

◆ XLChartSeries() [2/2]

XLChartSeries::XLChartSeries ( const XMLNode & node)
explicit

Member Function Documentation

◆ addErrorBars()

XLChartSeries & XLChartSeries::addErrorBars ( XLErrorBarDirection direction,
XLErrorBarType type,
XLErrorBarValueType valType,
double value = 0.0 )

Add error bars to this series.

◆ addTrendline()

XLChartSeries & XLChartSeries::addTrendline ( XLTrendlineType type,
std::string_view name = "",
uint8_t order = 2,
uint8_t period = 2 )

Add a trendline to this series.

◆ setColor()

XLChartSeries & XLChartSeries::setColor ( std::string_view hexRGB)

Set the fill and line color of this data series.

Parameters
hexRGBSix-character hex color string, e.g. "FF0000" for red.

◆ setDataLabels()

XLChartSeries & XLChartSeries::setDataLabels ( bool showValue,
bool showCategoryName = false,
bool showPercent = false )

Enable and configure data labels for this series.

Parameters
showValueShow the cell value on each label.
showCategoryNameShow the category name.
showPercentShow percentage (mainly for pie/doughnut charts).

◆ setDataLabelsFromRange()

XLChartSeries & XLChartSeries::setDataLabelsFromRange ( const XLWorksheet & wks,
const XLCellRange & range )

Set the data labels for this series to come from a worksheet range.

Parameters
wksThe worksheet containing the labels.
rangeThe range of cells to use for labels.

◆ setDataPointColor()

XLChartSeries & XLChartSeries::setDataPointColor ( uint32_t pointIdx,
std::string_view hexRGB )

Override the color of a single data point within this series.

Parameters
pointIdxZero-based index of the data point.
hexRGBSix-character hex color string.

◆ setLineDash()

XLChartSeries & XLChartSeries::setLineDash ( XLLineDashType dashType)

◆ setLineWidth()

XLChartSeries & XLChartSeries::setLineWidth ( double points)

◆ setMarkerStyle()

XLChartSeries & XLChartSeries::setMarkerStyle ( XLMarkerStyle style)

◆ setSmooth()

XLChartSeries & XLChartSeries::setSmooth ( bool smooth)

◆ setTitle()

XLChartSeries & XLChartSeries::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