CBarChartRenderer



This class implements chart renderer which draws chart data as bars.

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

class CBarChartRenderer :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;

    CBarChartRenderer();
    virtual ~CBarChartRenderer() = default;

    bool isDrawBorder(const POINT_STATE state) const; // Return whether borders should be drawn or not(depending on state) 
    bool isDrawBackground(const POINT_STATE state) const; // Return whether background should be drawn or not(depending on state) 
    float getBorderWidth(const POINT_STATE state) const; // Return borders width depending on state 
    Color getBorderColor(const POINT_STATE state) const; // Return borders color depending on state 
    Color getBackgroundColor(const POINT_STATE state) const; // Return background color depending on state 
    int getActivePoint() const; // Return index of active(hovered) point 
    bool isVertical() const; // Return whether drawing should be vertical 
    float getBarWidth() const; // Return bar width 

    bool setDrawBorder(const POINT_STATE state, const bool value); // Set whether borders should be drawn or not(depending on state) 
    bool setDrawBackground(const POINT_STATE state, const bool value); // Set whether background should be drawn or not(depending on state) 
    bool setBorderWidth(const POINT_STATE state, const float value); // Set borders width depending on state 
    bool setBorderColor(const POINT_STATE state, const Color &value); // Set borders color depending on state 
    bool setBackgroundColor(const POINT_STATE state, const Color &value); // Set background color depending on state 
    bool setActivePoint(const int value); // Set index of active(hovered) point 
    bool setVertical(const bool value); // Set whether drawing should be vertical 
    bool setBarWidth(const float value); // Set bar width 
};
Namespace: nitisa::charts
Include: Charts/Core/BarChartRenderer.h