20#ifndef jkqtpgraphsbarchartbase_H
21#define jkqtpgraphsbarchartbase_H
27#include "jkqtplotter/jkqtptools.h"
28#include "jkqtplotter/jkqtplotter_imexport.h"
29#include "jkqtplotter/jkqtpgraphsbase.h"
30#include "jkqtplotter/jkqtpgraphsbasestylingmixins.h"
187 virtual QColor getKeyLabelColor() const override;
192 double getShift() const;
194 double getWidth() const;
199 void setFillColor_and_darkenedColor(QColor fill,
int colorDarker=200);
202 int getBarPositionColumn() const;
205 int getBarHeightColumn() const;
213 double getRectRadiusAtValue() const;
215 double getRectRadiusAtBaseline() const;
223 bool usesCustomDrawFunctor() const;
225 bool getDrawBaseline() const;
227 double getStackSeparation() const;
252 void setUseCustomDrawFunctor(
bool enabled);
274 virtual
void autoscaleBarWidthAndShift(
double maxWidth=0.75,
double shrinkFactor=0.9);
286 void autoscaleBarWidthAndShiftSeparatedGroups(
double groupWidth=0.75);
288 void setShift(
double __value);
290 void setWidth(
double __value);
292 void setDrawBaseline(
bool __value);
295 void setStackSeparation(
double __value);
297 void setRectRadiusAtValue(
double __value);
299 void setRectRadiusAtBaseline(
double __value);
301 void setRectRadius(
double all);
303 void setRectRadius(
double atValue,
double atBaseline);
311 virtual
void setColor(QColor c);
315 void setBarPositionColumn(
int column) ;
318 void setBarPositionColumn(
size_t column) ;
321 void setBarHeightColumn(
int column) ;
324 void setBarHeightColumn(
size_t column) ;
346 double rectRadiusAtValue;
348 double rectRadiusAtBaseline;
364 double m_stackSeparation;
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
This is a base-class for all bar graphs with vertical or horizontal orientation (the orientation is i...
Definition jkqtpbarchartbase.h:152
virtual double getParentStackedMax(int index) const
used to generate stacked plots: returns the upper boundary of the parent plot in a stack,...
bool m_useCustomDrawFunctor
enabled custom drawing by m_customDrawFunctor
Definition jkqtpbarchartbase.h:441
CustomDrawingFunctor m_customDrawFunctor
this allows to provide custom drawing code for the bars. It is called for every visible bar if activa...
Definition jkqtpbarchartbase.h:436
std::function< void(JKQTPEnhancedPainter &painter, const QRectF &bar_px, const QPointF &datapoint, Qt::Orientation orientation, JKQTPBarGraphBase *graph)> CustomDrawingFunctor
functor for custom drawing of bars
Definition jkqtpbarchartbase.h:167
FillBrushFunctor m_fillBrushFunctor
functor, used to determine the color in m_fillMode==FunctorFilling
Definition jkqtpbarchartbase.h:411
std::function< QBrush(double key, double value, JKQTPEnhancedPainter &painter, JKQTPBarGraphBase *graph)> FillBrushFunctor
a type of functor for FillMode::FunctorFilling
Definition jkqtpbarchartbase.h:159
bool getPositionsMinMax(double &mmin, double &mmax, double &smallestGreaterZero)
get the maximum and minimum value of the box positions of the graph
bool getValuesMinMax(double &mmin, double &mmax, double &smallestGreaterZero)
get the maximum and minimum value in the box-elongation (i.e. value) direction of the graph
virtual bool considerForAutoscaling(JKQTPBarGraphBase *other) const =0
this function is used by autoscaleBarWidthAndShift() to determine whether a given graph shall be take...
virtual FillBrushFunctor constructFillBrushFunctor() const
returns a FillBrushFunctor that is appropriate for the currently selected m_fillMode
std::function< QBrush(double key, double value)> SimpleFillBrushFunctor
a simplified type of functor for FillMode::FunctorFilling
Definition jkqtpbarchartbase.h:164
virtual bool hasStackParent() const
returns true, if a stack parent is set (if available)
FillMode
specifies how the area below the graph is filled
Definition jkqtpbarchartbase.h:172
This is an interface-class for all stackable bargraphs ... it is used internally for autoscaling only...
Definition jkqtpbarchartbase.h:479
virtual ~JKQTPBarGraphStackInternalInterface()
Definition jkqtpbarchartbase.h:481
virtual JKQTPBarGraphBase * getBottomOfStack()=0
returns the barchart at the bottom of this stack (i.e. traverses the stack until there are no more pa...
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
This Mix-In class provides setter/getter methods, storage and other facilities for the graph filling ...
Definition jkqtpgraphsbasestylingmixins.h:529
This Mix-In class provides setter/getter methods, storage and other facilities for the graph line sty...
Definition jkqtpgraphsbasestylingmixins.h:49
This virtual JKQTPGraph descendent extends JKQTPXYGraph adds a baseline-property, which is necessary,...
Definition jkqtpgraphsbase.h:712
plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing)
Definition jkqtplotter.h:364
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
adapter that converts a SimpleFillBrushFunctor to a FillBrushFunctor
Definition jkqtpbarchartbase.h:386
QBrush operator()(double key, double value, JKQTPEnhancedPainter &, JKQTPBarGraphBase *)
Definition jkqtpbarchartbase.h:390
SimpleFillBrushFunctorAdaptor(const SimpleFillBrushFunctor &f)
Definition jkqtpbarchartbase.h:387
SimpleFillBrushFunctorAdaptor(SimpleFillBrushFunctor &&f)
Definition jkqtpbarchartbase.h:388
SimpleFillBrushFunctor m_f
Definition jkqtpbarchartbase.h:389
Specifies how a fill-color is derived from a given color.
Definition jkqtptools.h:262