CSteppedLineChartRenderer



This class implements chart renderer which draws chart data as stright stepped line connected points.

You can find more information in comments below. Overrided methods can be found in corresponding base class.

class CSteppedLineChartRenderer :public virtual IChartRenderer
{
public:
    enum POINT_STATE // Point states 
    {
        psNormal, // Normal 
        psActive // Mouse pointer is over the point 
    };
public:
    void Release() override;
    void Render(IRenderer *renderer, ITexture *texture, IChartData *data, const PointF &xrange, const PointF &yrange) override;

    CSteppedLineChartRenderer();
    virtual ~CSteppedLineChartRenderer() = default;

    bool isDrawPoints() const; // Return whether points should be drawn 
    bool isDrawLine() const; // Return whether lines should be drawn 
    bool isDrawBackground() const; // Return whether background should be drawn 
    float getPointSize(const POINT_STATE state) const; // Return point size depending on state 
    float getPointHole(const POINT_STATE state) const; // Return point hole size depending on state 
    Color getPointColor(const POINT_STATE state) const; // Return point color depending on state 
    Color getPointHoleColor(const POINT_STATE state) const; // Return point hole color depending on state 
    float getLineWidth() const; // Return line width 
    Color getLineColor() const; // Return line color 
    Color getBackgroundColor() const; // Return background color 
    int getActivePoint() const; // Return index of active(hovered) point 
    bool isVertical() const; // Return whether drawing should be vertical 
    LINE_INTERPOLATION_POSITION getInterpolationPosition() const; // Return line interpolation position 

    bool setDrawPoints(const bool value); // Set whether points should be drawn 
    bool setDrawLine(const bool value); // Set whether lines should be drawn 
    bool setDrawBackground(const bool value); // Set whether background should be drawn 
    bool setPointSize(const POINT_STATE state, const float value); // Set point size depending on state 
    bool setPointHole(const POINT_STATE state, const float value); // Set point hole size depending on state 
    bool setPointColor(const POINT_STATE state, const Color &value); // Set point color depending on state 
    bool setPointHoleColor(const POINT_STATE state, const Color &value); // Set point hole color depending on state 
    bool setLineWidth(const float value); // Set line width 
    bool setLineColor(const Color &value); // Set line color 
    bool setBackgroundColor(const Color &value); // Set background color 
    bool setActivePoint(const int value); // Set index of active(hovered) point 
    bool setVertical(const bool value); // Set whether drawing should be vertical 
    bool setInterpolationPosition(const LINE_INTERPOLATION_POSITION value); // Set line interpolation position 
};
Namespace: nitisa::charts
Include: Charts/Core/SteppedLineChartRenderer.h