# KDChart::DataValueAttributes Class Reference

`#include <KDChartDataValueAttributes>`

List of all members.

## 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, howmany decimal digits are displayed, etc.

Definition at line 59 of file KDChartDataValueAttributes.h.

## Public Member Functions

BackgroundAttributes | backgroundAttributes () const
QString | dataLabel () const
| Returns the string displayed instead of the data value label.
| DataValueAttributes (const DataValueAttributes &)
| DataValueAttributes ()
int | decimalDigits () const
FrameAttributes | frameAttributes () const
bool | isVisible () const
MarkerAttributes | markerAttributes () const
const RelativePosition | negativePosition () const
| Return the relative positioning of the data value labels.
bool | operator!= (const DataValueAttributes &other) const
DataValueAttributes & | operator= (const DataValueAttributes &)
bool | operator== (const DataValueAttributes &) const
const RelativePosition | position (bool positive) const
const RelativePosition | positivePosition () const
| Return the relative positioning of the data value labels.
int | powerOfTenDivisor () const
QString | prefix () const
| Returns the string used as a prefix to the data value text.
void | setBackgroundAttributes (const BackgroundAttributes &a)
| Set the background attributes to use for the data value labels area.
void | setDataLabel (const QString label)
| display a string label instead of the original data value label
void | setDecimalDigits (int digits)
| Set how many decimal digits to display when rendering the data value labels.
void | setFrameAttributes (const FrameAttributes &a)
| Set the frame attributes to use for the data value labels area.
void | setMarkerAttributes (const MarkerAttributes &a)
| Set the marker attributes to use for the data values.
void | setNegativePosition (const RelativePosition &relPosition)
| Defines the relative positioning of the data value labels for negative values.
void | setPositivePosition (const RelativePosition &relPosition)
| Defines the relative position of the data value labels for positive values.
void | setPowerOfTenDivisor (int powerOfTenDivisor)
| These method are planned for future versions of KD Chart, so they are not part of the documented API yet.
void | setPrefix (const QString prefix)
| Prepend a prefix string to the data value label.
void | setShowInfinite (bool infinite)
| PLANNED_FOR_FUTURE
void | setShowRepetitiveDataLabels (bool showRepetitiveDataLabels)
| Set whether data value labels not different from their predecessors should be drawn.
void | setSuffix (const QString suffix)
| Append a suffix string to the data value label.
void | setTextAttributes (const TextAttributes &a)
| Set the text attributes to use for the data value labels.
void | setVisible (bool visible)
| Set whether data value labels should be displayed.
bool | showInfinite () const
bool | showRepetitiveDataLabels () const
| PLANNED_FOR_FUTURE
QString | suffix () const
| Returns the string used as a suffix to the data value text.
TextAttributes | textAttributes () const
| ~DataValueAttributes ()

## Static Public Member Functions

const DataValueAttributes & | defaultAttributes ()
const QVariant & | defaultAttributesAsVariant ()

## Constructor & Destructor Documentation

KDChart::DataValueAttributes::DataValueAttributes | ( |  | ) |

KDChart::DataValueAttributes::DataValueAttributes | ( | const DataValueAttributes & |  | ) |

KDChart::DataValueAttributes::~DataValueAttributes | ( |  | ) |

## Member Function Documentation

BackgroundAttributes KDChart::DataValueAttributes::backgroundAttributes | ( |  | ) | const

Returns:
  The background attributes used for painting the data value labels area.

See also:
  BackgroundAttributes

Referenced by operator<<().

QString KDChart::DataValueAttributes::dataLabel | ( |  | ) | const

Returns the string displayed instead of the data value label.

See also:
  setDataLabel

Referenced by KDChart::AbstractDiagram::paintDataValueText().

int KDChart::DataValueAttributes::decimalDigits | ( |  | ) | const

Returns:
  The number of decimal digits displayed.

Referenced by operator<<(), and KDChart::AbstractDiagram::paintDataValueText().

const DataValueAttributes& KDChart::DataValueAttributes::defaultAttributes | ( |  | ) | `[static]`

const QVariant& KDChart::DataValueAttributes::defaultAttributesAsVariant | ( |  | ) | `[static]`

FrameAttributes KDChart::DataValueAttributes::frameAttributes | ( |  | ) | const

Returns:
  The frame attributes used for painting the data value labels area.

See also:
  FrameAttributes

Referenced by operator<<().

bool KDChart::DataValueAttributes::isVisible | ( |  | ) | const

Returns:
  Whether data value labels should be displayed.

Referenced by operator<<(), KDChart::AbstractDiagram::paintDataValueText(), and KDChart::AbstractDiagram::paintMarker().

MarkerAttributes KDChart::DataValueAttributes::markerAttributes | ( |  | ) | const

Returns:
  The marker attributes used for decorating the data values.

See also:
  MarkerAttributes

Referenced by KDChart::AbstractDiagram::paintMarker().

const RelativePosition KDChart::DataValueAttributes::negativePosition | ( |  | ) | const

Return the relative positioning of the data value labels.

See also:
  setNegativePosition

Referenced by operator<<().

bool KDChart::DataValueAttributes::operator!= | ( | const DataValueAttributes & | other | ) | const

Definition at line 66 of file KDChartDataValueAttributes.h.

    00066 { return !operator==(other); }

DataValueAttributes& KDChart::DataValueAttributes::operator= | ( | const DataValueAttributes & |  | ) |

bool KDChart::DataValueAttributes::operator== | ( | const DataValueAttributes & |  | ) | const

const RelativePosition KDChart::DataValueAttributes::position | ( | bool | positive | ) | const

Definition at line 259 of file KDChartDataValueAttributes.h.

Referenced by KDChart::AbstractDiagram::paintDataValueText().

    00260   {
    00261     return positive ? positivePosition() : negativePosition();
    00262   }

const RelativePosition KDChart::DataValueAttributes::positivePosition | ( |  | ) | const

Return the relative positioning of the data value labels.

See also:
  setPositivePosition

Referenced by operator<<().

int KDChart::DataValueAttributes::powerOfTenDivisor | ( |  | ) | const

| Referenced by operator<<().

QString KDChart::DataValueAttributes::prefix | ( |  | ) | const

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

See also:
  setPrefix

Referenced by KDChart::AbstractDiagram::paintDataValueText().

void KDChart::DataValueAttributes::setBackgroundAttributes | ( | const BackgroundAttributes & | a | ) |

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

Parameters:

  a | The background attributes to set.

See also:
  BackgroundAttributes

void KDChart::DataValueAttributes::setDataLabel | ( | const QString | label | ) |

display a string label instead of the original data value label

See also:
  dataLabel

void KDChart::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:

  digits | The number of decimal digits to use.

void KDChart::DataValueAttributes::setFrameAttributes | ( | const FrameAttributes & | a | ) |

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

Parameters:

  a | The frame attributes to set.

See also:
  FrameAttributes

void KDChart::DataValueAttributes::setMarkerAttributes | ( | const MarkerAttributes & | a | ) |

Set the marker attributes to use for the data values.

This includes the marker type.

Parameters:

  a | The marker attributes to set.

See also:
  MarkerAttributes

void KDChart::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 releation 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 also:
  negativePosition

void KDChart::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 releation 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 also:
  positivePosition

void KDChart::DataValueAttributes::setPowerOfTenDivisor | ( | int | powerOfTenDivisor | ) |

| These method are planned for future versions of KD Chart, so they are not part of the documented API yet.

void KDChart::DataValueAttributes::setPrefix | ( | const QString | prefix | ) |

Prepend a prefix string to the data value label.

See also:
  prefix

void KDChart::DataValueAttributes::setShowInfinite | ( | bool | infinite | ) |

| PLANNED_FOR_FUTURE These method are planned for future versions of KD Chart, so they are not part of the documented API yet.

void KDChart::DataValueAttributes::setShowRepetitiveDataLabels | ( | bool | showRepetitiveDataLabels | ) |

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

Parameters:

  showRepetitiveDataLabels | Whether data value not different from their predecessors are drawn.

void KDChart::DataValueAttributes::setSuffix | ( | const QString | suffix | ) |

Append a suffix string to the data value label.

See also:
  suffix

void KDChart::DataValueAttributes::setTextAttributes | ( | const TextAttributes & | a | ) |

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

Parameters:

  a | The text attributes to set.

See also:
  TextAttributes

void KDChart::DataValueAttributes::setVisible | ( | bool | visible | ) |

Set whether data value labels should be displayed.

Parameters:

  visible | Whether data value labels should be displayed.

bool KDChart::DataValueAttributes::showInfinite | ( |  | ) | const

| Referenced by operator<<().

bool KDChart::DataValueAttributes::showRepetitiveDataLabels | ( |  | ) | const

PLANNED_FOR_FUTURE

Returns:
  Whether data values not different from their predecessors are drawn.

Referenced by operator<<(), and KDChart::AbstractDiagram::paintDataValueText().

QString KDChart::DataValueAttributes::suffix | ( |  | ) | const

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

See also:
  setSuffix

Referenced by KDChart::AbstractDiagram::paintDataValueText().

TextAttributes KDChart::DataValueAttributes::textAttributes | ( |  | ) | const

Returns:
  The text attributes used for painting data value labels.

Referenced by operator<<(), and KDChart::AbstractDiagram::paintDataValueText().

The documentation for this class was generated from the following file:

- KDChartDataValueAttributes.h