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 class PointState // Point states 
    {
        Normal, // Normal 
        Active // 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 PointState state) const; // Return point size depending on state 
    float getPointHole(const PointState state) const; // Return point hole size depending on state 
    Color getPointColor(const PointState state) const; // Return point color depending on state 
    Color getPointHoleColor(const PointState 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 
    LineInterpolationPosition 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 PointState state, const float value); // Set point size depending on state 
    bool setPointHole(const PointState state, const float value); // Set point hole size depending on state 
    bool setPointColor(const PointState state, const Color &value); // Set point color depending on state 
    bool setPointHoleColor(const PointState 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 LineInterpolationPosition value); // Set line interpolation position 
};
Namespace: nitisa::charts
Include: Charts/Core/SteppedLineChartRenderer.h