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

Method fillDataSpreadsheet

src/backend/worksheet/plots/cartesian/BoxPlot.cpp:709–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709void BoxPlotPrivate::fillDataSpreadsheet(Spreadsheet* spreadsheet) const {
710 // index
711 // 1st quartile
712 // 3rd quartile
713 // median
714 // whiskers min
715 // whiskers max
716 // data points count
717 // outliers count
718 // far out points count
719
720 for (int i = 0; i < q->dataColumns().count(); ++i) {
721 const auto* column = static_cast<const Column*>(q->dataColumns().at(i));
722 const auto& statistics = column->statistics();
723
724 spreadsheet->column(0)->setIntegerAt(i, i + 1);
725 spreadsheet->column(1)->setValueAt(i, statistics.firstQuartile);
726 spreadsheet->column(2)->setValueAt(i, statistics.thirdQuartile);
727 spreadsheet->column(3)->setValueAt(i, statistics.median);
728 spreadsheet->column(4)->setValueAt(i, m_whiskerMin.at(i));
729 spreadsheet->column(5)->setValueAt(i, m_whiskerMax.at(i));
730 spreadsheet->column(6)->setValueAt(i, m_dataPointsLogical.at(i).count());
731 spreadsheet->column(7)->setValueAt(i, m_outlierPointsLogical.at(i).count());
732 spreadsheet->column(8)->setValueAt(i, m_farOutPointsLogical.at(i).count());
733 }
734}
735
736/*!
737 * adds additional elements for background and line properties according to the current

Callers 1

createDataSpreadsheetMethod · 0.80

Calls 5

statisticsMethod · 0.80
countMethod · 0.45
setIntegerAtMethod · 0.45
columnMethod · 0.45
setValueAtMethod · 0.45

Tested by

no test coverage detected