LibreOffice Module sc (master) 1
|
Contains and manages the values of the sparkline. More...
#include <SparklineRenderer.hxx>
Public Member Functions | |
std::vector< SparklineValue > const & | getValuesList () const |
void | add (double fValue, SparklineValue::Action eAction) |
void | interpolatePastValues (double nCurrentValue, size_t nCurrentIndex) |
void | convertToStacked () |
void | reverse () |
Static Public Member Functions | |
static constexpr double | interpolate (double x1, double y1, double x2, double y2, double x) |
Public Attributes | |
size_t | mnFirstIndex = std::numeric_limits<size_t>::max() |
size_t | mnLastIndex = 0 |
double | mfMinimum = std::numeric_limits<double>::max() |
double | mfMaximum = std::numeric_limits<double>::min() |
Private Attributes | |
double | mfPreviousValue = 0.0 |
size_t | mnPreviousIndex = std::numeric_limits<size_t>::max() |
std::vector< size_t > | maToInterpolateIndex |
std::vector< SparklineValue > | maValueList |
Contains and manages the values of the sparkline.
It automatically keeps track of the minimums and maximums, and skips or interpolates the sparkline values if needed, depending on the input. This is done so it is easier to handle the sparkline values later on.
Definition at line 60 of file SparklineRenderer.hxx.
|
inline |
Definition at line 79 of file SparklineRenderer.hxx.
References sc::SparklineValue::Interpolate, interpolatePastValues(), maToInterpolateIndex, maValueList, mfMaximum, mfMinimum, mfPreviousValue, mnFirstIndex, mnLastIndex, mnPreviousIndex, sc::SparklineValue::None, and sc::SparklineValue::Skip.
Referenced by sc::SparklineRenderer::render().
|
inline |
Definition at line 142 of file SparklineRenderer.hxx.
References maValueList, mfMaximum, and mfMinimum.
Referenced by sc::SparklineRenderer::render().
|
inline |
Definition at line 77 of file SparklineRenderer.hxx.
References maValueList.
Referenced by sc::SparklineRenderer::drawColumn(), and sc::SparklineRenderer::drawLine().
|
inlinestaticconstexpr |
Definition at line 109 of file SparklineRenderer.hxx.
References x.
Referenced by interpolatePastValues().
|
inline |
Definition at line 114 of file SparklineRenderer.hxx.
References interpolate(), maToInterpolateIndex, maValueList, mfPreviousValue, mnPreviousIndex, nIndex, sc::SparklineValue::None, and sc::SparklineValue::Skip.
Referenced by add().
|
inline |
Definition at line 164 of file SparklineRenderer.hxx.
References maValueList.
Referenced by sc::SparklineRenderer::render().
|
private |
Definition at line 66 of file SparklineRenderer.hxx.
Referenced by add(), and interpolatePastValues().
|
private |
Definition at line 68 of file SparklineRenderer.hxx.
Referenced by add(), convertToStacked(), getValuesList(), interpolatePastValues(), and reverse().
double sc::SparklineValues::mfMaximum = std::numeric_limits<double>::min() |
Definition at line 75 of file SparklineRenderer.hxx.
Referenced by add(), convertToStacked(), sc::SparklineRenderer::drawColumn(), sc::SparklineRenderer::drawLine(), and sc::SparklineRenderer::setFillAndLineColor().
double sc::SparklineValues::mfMinimum = std::numeric_limits<double>::max() |
Definition at line 74 of file SparklineRenderer.hxx.
Referenced by add(), convertToStacked(), sc::SparklineRenderer::drawColumn(), sc::SparklineRenderer::drawLine(), and sc::SparklineRenderer::setFillAndLineColor().
|
private |
Definition at line 63 of file SparklineRenderer.hxx.
Referenced by add(), and interpolatePastValues().
size_t sc::SparklineValues::mnFirstIndex = std::numeric_limits<size_t>::max() |
Definition at line 71 of file SparklineRenderer.hxx.
Referenced by add(), sc::SparklineRenderer::drawLine(), and sc::SparklineRenderer::setFillAndLineColor().
size_t sc::SparklineValues::mnLastIndex = 0 |
Definition at line 72 of file SparklineRenderer.hxx.
Referenced by add(), sc::SparklineRenderer::drawLine(), and sc::SparklineRenderer::setFillAndLineColor().
|
private |
Definition at line 64 of file SparklineRenderer.hxx.
Referenced by add(), and interpolatePastValues().