Added in checkbox to use all samples in Concentrations tab (very slow).
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Pane showing BC control concentrations summary.
|
||||
"""
|
||||
from PyQt6.QtWidgets import QWidget, QPushButton
|
||||
from PyQt6.QtWidgets import QWidget, QPushButton, QCheckBox, QLabel
|
||||
from .info_tab import InfoPane
|
||||
from backend.excel.reports import ConcentrationMaker
|
||||
from frontend.visualizations.concentrations_chart import ConcentrationsChart
|
||||
@@ -20,6 +20,12 @@ class Concentrations(InfoPane):
|
||||
self.export_button = QPushButton("Save Data", parent=self)
|
||||
self.export_button.pressed.connect(self.save_excel)
|
||||
self.layout.addWidget(self.export_button, 0, 3, 1, 1)
|
||||
check_label = QLabel("Controls Only")
|
||||
self.all_box = QCheckBox()
|
||||
self.all_box.setChecked(True)
|
||||
self.all_box.checkStateChanged.connect(self.update_data)
|
||||
self.layout.addWidget(check_label, 1, 0, 1, 1)
|
||||
self.layout.addWidget(self.all_box, 1, 1, 1, 1)
|
||||
self.fig = None
|
||||
self.report_object = None
|
||||
self.update_data()
|
||||
@@ -33,7 +39,8 @@ class Concentrations(InfoPane):
|
||||
"""
|
||||
super().update_data()
|
||||
months = self.diff_month(self.start_date, self.end_date)
|
||||
chart_settings = dict(start_date=self.start_date, end_date=self.end_date)
|
||||
# logger.debug(f"Box checked: {self.all_box.isChecked()}")
|
||||
chart_settings = dict(start_date=self.start_date, end_date=self.end_date, controls_only=self.all_box.isChecked())
|
||||
self.report_obj = ConcentrationMaker(**chart_settings)
|
||||
self.fig = ConcentrationsChart(df=self.report_obj.df, settings=chart_settings, modes=[], months=months)
|
||||
self.webview.setHtml(self.fig.html)
|
||||
|
||||
Reference in New Issue
Block a user