MCPcopy Create free account
hub / github.com/KDE/labplot / xIndexCount

Method xIndexCount

src/backend/worksheet/plots/cartesian/ProcessBehaviorChart.cpp:350–367  ·  view source on GitHub ↗

! * returns the number of index labels used for x. */

Source from the content-addressed store, hash-verified

348 * returns the number of index labels used for x.
349 */
350int 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
370Line* ProcessBehaviorChart::dataLine() const {

Callers 1

recalcMethod · 0.45

Calls 1

rowCountMethod · 0.45

Tested by

no test coverage detected