@brief Set a series "categories" range using row and column values.
@param series A series object created via chart_add_series().
@param sheetname The name of the worksheet that contains the data range.
@param first_row The first row of the range. (All zero indexed.)
@param first_col The first column of the range.
@param last_row The last row of the range.
@param last_col The last col of the range.
The categories and values of a chart data series are generally set
using the chart_add_series() function and Excel range formulas like
"=Sheet1!$A$2:$A$7".
The %chart_series_set_categories() function is an alternative method that
is easier to generate programmatically. It requires that you set the
categories and values parameters in chart_add_series()to NULL and
then set them using row and column values in
chart_series_set_categories() and chart_series_set_values():
@brief Set a series "categories" range using row and column values.
@param series A series object created via chart_add_series(). @param sheetname The name of the worksheet that contains the data range. @param first_row The first row of the range. (All zero indexed.) @param first_col The first column of the range. @param last_row The last row of the range. @param last_col The last col of the range.
The categories and values of a chart data series are generally set using the chart_add_series() function and Excel range formulas like "=Sheet1!$A$2:$A$7".
The %chart_series_set_categories() function is an alternative method that is easier to generate programmatically. It requires that you set the categories and values parameters in chart_add_series()to NULL and then set them using row and column values in chart_series_set_categories() and chart_series_set_values():
@code lxw_chart_series *series = chart_add_series(chart, NULL, NULL);
// Configure the series ranges programmatically. chart_series_set_categories(series, "Sheet1", 1, 0, 6, 0); // "=Sheet1!$A$2:$A$7" chart_series_set_values( series, "Sheet1", 1, 2, 6, 2); // "=Sheet1!$C$2:$C$7" @endcode