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 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;

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

    bool isDrawBorder(const PointState state) const; // Return whether borders should be drawn or not(depending on state) 
    bool isDrawBackground(const PointState state) const; // Return whether background should be drawn or not(depending on state) 
    float getBorderWidth(const PointState state) const; // Return borders width depending on state 
    Color getBorderColor(const PointState state) const; // Return borders color depending on state 
    Color getBackgroundColor(const PointState 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 PointState state, const bool value); // Set whether borders should be drawn or not(depending on state) 
    bool setDrawBackground(const PointState state, const bool value); // Set whether background should be drawn or not(depending on state) 
    bool setBorderWidth(const PointState state, const float value); // Set borders width depending on state 
    bool setBorderColor(const PointState state, const Color &value); // Set borders color depending on state 
    bool setBackgroundColor(const PointState 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