| 417 | } |
| 418 | |
| 419 | QString AbstractDiagram::Private::formatDataValueText(const DataValueAttributes &dva, |
| 420 | const QModelIndex &index, qreal value) const |
| 421 | { |
| 422 | if (!dva.isVisible()) { |
| 423 | return QString(); |
| 424 | } |
| 425 | if (dva.usePercentage()) { |
| 426 | value = calcPercentValue(index); |
| 427 | } |
| 428 | |
| 429 | QString ret; |
| 430 | if (dva.dataLabel().isNull()) { |
| 431 | ret = formatNumber(value, dva.decimalDigits()); |
| 432 | } else { |
| 433 | ret = dva.dataLabel(); |
| 434 | } |
| 435 | |
| 436 | ret.prepend(dva.prefix()); |
| 437 | ret.append(dva.suffix()); |
| 438 | |
| 439 | return ret; |
| 440 | } |
| 441 | |
| 442 | void AbstractDiagram::Private::paintDataValueText( |
| 443 | QPainter *painter, |
nothing calls this directly
no test coverage detected