KChart::DataValueAttributes

Search for usage in LXR

KChart::DataValueAttributes Class Reference

#include <KChartDataValueAttributes>

Public Member Functions

 DataValueAttributes (const DataValueAttributes &)
 
BackgroundAttributes backgroundAttributes () const
 
QString dataLabel () const
 
int decimalDigits () const
 
FrameAttributes frameAttributes () const
 
bool isVisible () const
 
MarkerAttributes markerAttributes () const
 
bool mirrorNegativeValueTextRotation () const
 
const RelativePosition negativePosition () const
 
bool operator!= (const DataValueAttributes &other) const
 
DataValueAttributesoperator= (const DataValueAttributes &)
 
bool operator== (const DataValueAttributes &) const
 
const RelativePosition position (bool positive) const
 
const RelativePosition positivePosition () const
 
QString prefix () const
 
void setBackgroundAttributes (const BackgroundAttributes &a)
 
void setDataLabel (const QString label)
 
void setDecimalDigits (int digits)
 
void setFrameAttributes (const FrameAttributes &a)
 
void setMarkerAttributes (const MarkerAttributes &a)
 
void setMirrorNegativeValueTextRotation (bool enable)
 
void setNegativePosition (const RelativePosition &relPosition)
 
void setPositivePosition (const RelativePosition &relPosition)
 
void setPrefix (const QString prefix)
 
void setShowOverlappingDataLabels (bool showOverlappingDataLabels)
 
void setShowRepetitiveDataLabels (bool showRepetitiveDataLabels)
 
void setSuffix (const QString suffix)
 
void setTextAttributes (const TextAttributes &a)
 
void setUsePercentage (bool enable)
 
void setVisible (bool visible)
 
bool showOverlappingDataLabels () const
 
bool showRepetitiveDataLabels () const
 
QString suffix () const
 
TextAttributes textAttributes () const
 
bool usePercentage () const
 

Static Public Member Functions

static const DataValueAttributesdefaultAttributes ()
 
static const QVariantdefaultAttributesAsVariant ()
 

Detailed Description

Diagram attributes dealing with data value labels.

The DataValueAttributes group all properties that can be set wrt data value labels and if and how they are displayed. This includes things like the text attributes (font, color), what markers are used, how many decimal digits are displayed, etc.

Definition at line 41 of file KChartDataValueAttributes.h.

Member Function Documentation

BackgroundAttributes DataValueAttributes::backgroundAttributes ( ) const
Returns
The background attributes used for painting the data value labels area.
See also
BackgroundAttributes

Definition at line 179 of file KChartDataValueAttributes.cpp.

QString DataValueAttributes::dataLabel ( ) const

Returns the string displayed instead of the data value label.

See also
setDataLabel

Definition at line 249 of file KChartDataValueAttributes.cpp.

int DataValueAttributes::decimalDigits ( ) const
Returns
The number of decimal digits displayed.

Definition at line 219 of file KChartDataValueAttributes.cpp.

FrameAttributes DataValueAttributes::frameAttributes ( ) const
Returns
The frame attributes used for painting the data value labels area.
See also
FrameAttributes

Definition at line 169 of file KChartDataValueAttributes.cpp.

bool DataValueAttributes::isVisible ( ) const
Returns
Whether data value labels should be displayed.

Definition at line 149 of file KChartDataValueAttributes.cpp.

MarkerAttributes DataValueAttributes::markerAttributes ( ) const
Returns
The marker attributes used for decorating the data values.
See also
MarkerAttributes

Definition at line 189 of file KChartDataValueAttributes.cpp.

bool DataValueAttributes::mirrorNegativeValueTextRotation ( ) const

If true, rotation of negative value labels is negated, so that negative values are rotated in opposite direction of textAttributes().rotation(), and in this sense appear "mirrored" to positive value labels, though the text itself is not mirrored, only its rotation.

Definition at line 199 of file KChartDataValueAttributes.cpp.

const RelativePosition DataValueAttributes::negativePosition ( ) const

Return the relative positioning of the data value labels.

See also
setNegativePosition

Definition at line 299 of file KChartDataValueAttributes.cpp.

const RelativePosition DataValueAttributes::positivePosition ( ) const

Return the relative positioning of the data value labels.

See also
setPositivePosition

Definition at line 309 of file KChartDataValueAttributes.cpp.

QString DataValueAttributes::prefix ( ) const

Returns the string used as a prefix to the data value text.

See also
setPrefix

Definition at line 229 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setBackgroundAttributes ( const BackgroundAttributes a)

Set the background attributes to use for the data value labels area.

Parameters
aThe background attributes to set.
See also
BackgroundAttributes

Definition at line 174 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setDataLabel ( const QString  label)

display a string label instead of the original data value label Supports HTML code.

See also
dataLabel

Definition at line 244 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setDecimalDigits ( int  digits)

Set how many decimal digits to display when rendering the data value labels.

If there are no decimal digits it will not be displayed.

Parameters
digitsThe number of decimal digits to use.

Definition at line 214 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setFrameAttributes ( const FrameAttributes a)

Set the frame attributes to use for the data value labels area.

Parameters
aThe frame attributes to set.
See also
FrameAttributes

Definition at line 164 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setMarkerAttributes ( const MarkerAttributes a)

Set the marker attributes to use for the data values.

This includes the marker type.

Parameters
aThe marker attributes to set.
See also
MarkerAttributes

Definition at line 184 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setMirrorNegativeValueTextRotation ( bool  enable)
void DataValueAttributes::setNegativePosition ( const RelativePosition relPosition)

Defines the relative positioning of the data value labels for negative values.

The position is specified in relation to the respective data value point, or in relation to the respective data representation area, that's one area segment in a LineDiagram showing areas, or one bar in a BarDiagram, one pie slice ...

See detailed description of KChart::Position for an illustration of the different possible reference positions.

See also
negativePosition

Definition at line 294 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setPositivePosition ( const RelativePosition relPosition)

Defines the relative position of the data value labels for positive values.

The position is specified in relation to the respective data value point, or in relation to the respective data representation area, that's one area segment in a LineDiagram showing areas, or one bar in a BarDiagram, one pie slice ...

See detailed description of KChart::Position for an illustration of the different possible reference positions.

See also
positivePosition

Definition at line 304 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setPrefix ( const QString  prefix)

Prepend a prefix string to the data value label.

See also
prefix

Definition at line 224 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setShowOverlappingDataLabels ( bool  showOverlappingDataLabels)

Set whether data value texts overlapping other data value texts of the same diagram should be drawn.

Parameters
showOverlappingDataLabelsWhether data texts overlapping other data value texts of the same diagram are drawn.

Definition at line 269 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setShowRepetitiveDataLabels ( bool  showRepetitiveDataLabels)

Set whether data value labels not different from their predecessors should be drawn.

Parameters
showRepetitiveDataLabelsWhether data value not different from their predecessors are drawn.

Definition at line 259 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setSuffix ( const QString  suffix)

Append a suffix string to the data value label.

See also
suffix

Definition at line 234 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setTextAttributes ( const TextAttributes a)

Set the text attributes to use for the data value labels.

Parameters
aThe text attributes to set.
See also
TextAttributes

Definition at line 154 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setUsePercentage ( bool  enable)

Specify whether to use percentages instead of actual data point values when no specific label is set.

In a bar or cartesian diagram, this means that the value will be shown in % in relation to the sum of all values in the same category, in a polar diagram in relation to the sum of all values in a data set.

When this is turned on, the value will not automatically have the '' postfix.

Parameters
enableWhether to enable percentage values

Definition at line 204 of file KChartDataValueAttributes.cpp.

void DataValueAttributes::setVisible ( bool  visible)

Set whether data value labels should be displayed.

Parameters
visibleWhether data value labels should be displayed.

Definition at line 144 of file KChartDataValueAttributes.cpp.

bool DataValueAttributes::showOverlappingDataLabels ( ) const
Returns
Whether data value texts overlapping other data value texts of the same diagram are drawn.

Definition at line 264 of file KChartDataValueAttributes.cpp.

bool DataValueAttributes::showRepetitiveDataLabels ( ) const
Returns
Whether data values not different from their predecessors are drawn.

Definition at line 254 of file KChartDataValueAttributes.cpp.

QString DataValueAttributes::suffix ( ) const

Returns the string used as a suffix to the data value text.

See also
setSuffix

Definition at line 239 of file KChartDataValueAttributes.cpp.

TextAttributes DataValueAttributes::textAttributes ( ) const
Returns
The text attributes used for painting data value labels.

Definition at line 159 of file KChartDataValueAttributes.cpp.

bool DataValueAttributes::usePercentage ( ) const
Returns
Whether to use percentage values
See also
setUsePercentage

Definition at line 209 of file KChartDataValueAttributes.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Oct 21 2021 22:37:39 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.