Skip to content

Commit 737dd79

Browse files
committed
fix default settings for line_type_threshold
1 parent af9f51f commit 737dd79

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

DataPlotly/core/plot_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def __init__(self, plot_type: str = 'scatter', properties: dict = None, layout:
139139
'layout_filter_by_atlas': False,
140140
'pie_hole': 0,
141141
'fill': False,
142-
'line_type_threshold': 'dot',
142+
'line_type_threshold': 'Dot Line',
143143
'threshold_value': 1,
144144
'threshold': False
145145
}

DataPlotly/gui/plot_settings_widget.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ def get_settings(self) -> PlotSettings: # pylint: disable=R0915
11481148
'fill': self.fill.isChecked(),
11491149
'threshold': self.threshold.isChecked(),
11501150
'y_combo_radar_label': self.y_combo_radar_label.currentText(),
1151-
'line_type_threshold': self.line_types2[self.line_type_threshold.currentText()],
1151+
'line_type_threshold': self.line_type_threshold.currentText(),
11521152
'threshold_value': self.threshold_value.value(),
11531153
'y_fields_combo': ', '.join(self.y_fields_combo.checkedItems())
11541154
}
@@ -1381,9 +1381,9 @@ def set_settings(self, settings: PlotSettings): # pylint: disable=too-many-stat
13811381
self.pie_hole.setValue(settings.properties.get('pie_hole', 0))
13821382
for name in settings.properties.get('y_fields_combo', '').split(", "):
13831383
self.y_fields_combo.setItemCheckState(self.y_fields_combo.findText(name), Qt.CheckState.Checked)
1384-
self.line_type_threshold.setCurrentIndex(self.line_type_threshold.findData(
1385-
settings.properties.get('line_type_threshold', 'dot')
1386-
))
1384+
self.line_type_threshold.setCurrentText(
1385+
settings.properties.get('line_type_threshold', 'Dot Line')
1386+
)
13871387
self.threshold.setChecked(
13881388
settings.properties.get('threshold', True))
13891389
self.y_combo_radar_label.setExpression(settings.properties.get('y_combo_radar_label', ''))

0 commit comments

Comments
 (0)