| 707 | } |
| 708 | |
| 709 | void 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 |
no test coverage detected