BarPlot

This class implements the bar plot that is used to visualize categorical data.

Public Types

  • enum Type

Public Methods

void

BarPlot(const QString &)

Background*

backgroundAt(int) const

QColor

color() const override

QColor

colorAt(int) const

QMenu*

createContextMenu() override

int

dataCount(Dimension) const override

ErrorBar*

errorBarAt(int) const

void

handleAspectUpdated(const QString &aspectPath, const AbstractAspect *element) override

void

handleResize(double horizontalRatio, double verticalRatio, bool pageResize) override

bool

hasData() const override

QIcon

icon() const override

bool

indicesMinMax(const Dimension dim, double, double, int &start, int &end) const override

Line*

lineAt(int) const

bool

load(XmlStreamReader *, bool preview) override

void

loadThemeConfig(const KConfig &) override

double

maximum(CartesianCoordinateSystem::Dimension) const override

bool

minMax(const Dimension dim, const Range< int > &indexRange, Range< double > &r, bool includeErrorBars=true) const override

double

minimum(CartesianCoordinateSystem::Dimension) const override

void

recalc() override

void

retransform() override

void

save(QXmlStreamWriter *) const override

void

updateLocale() override

bool

usingColumn(const AbstractColumn *, bool indirect) const override

Value*

value() const

Detailed Description

class BarPlot : public Plot

This class implements the bar plot that is used to visualize categorical data.

The implementation supports the visualization of multiple data sets (column) at the same time with different ways to order them and to modify their properties separately.

Public Functions

virtual QIcon icon() const override

Returns an icon to be used in the project explorer.

virtual QMenu *createContextMenu() override

Return a new context menu.

The caller takes ownership of the menu.

virtual void save(QXmlStreamWriter*) const override

Save as XML.

virtual bool load(XmlStreamReader*, bool preview) override

Load from XML.

virtual bool hasData() const override

returns true if a valid data column is set, returns false otherwise. Used in CartesianPlot to determine whether the curve needs to be taken into account when calculating the data ranges of the plot area.

virtual void handleAspectUpdated(const QString &aspectPath, const AbstractAspect *element) override

handleAspectUpdated in some cases one aspect can depend on another, like a XYCurve on Column or InfoElement on XYCurve. This is a generic function called for all Elements when a new aspect will be added even it is not a child of the current element

Path is explicit specified, so it must not be recalculated every time when iterating over multiple WorksheetElements. The path is the same as aspect->path()

Parameters:

path –