! * returns the number of index labels used for x. */
| 348 | * returns the number of index labels used for x. |
| 349 | */ |
| 350 | int ProcessBehaviorChart::xIndexCount() const { |
| 351 | Q_D(const ProcessBehaviorChart); |
| 352 | if (!d->dataColumn) |
| 353 | return 0; |
| 354 | |
| 355 | int count = d->dataColumn->rowCount(); |
| 356 | // subract the remainder to handle complete samples only for chart types where one point per sample is plotted |
| 357 | if (d->type == ProcessBehaviorChart::Type::XbarR || d->type == ProcessBehaviorChart::Type::R || d->type == ProcessBehaviorChart::Type::XbarS |
| 358 | || d->type == ProcessBehaviorChart::Type::S) { |
| 359 | const int remainder = count % d->sampleSize; |
| 360 | if (remainder > 0) |
| 361 | count -= remainder; |
| 362 | |
| 363 | count = count / d->sampleSize; |
| 364 | } |
| 365 | |
| 366 | return count; |
| 367 | } |
| 368 | |
| 369 | // lines |
| 370 | Line* ProcessBehaviorChart::dataLine() const { |