@@ -116,14 +116,6 @@ def __init__(
116
116
117
117
self .hbox .addLayout (self .vbox )
118
118
119
- # self.toolbar_layout = QHBoxLayout()
120
- # self.toolbar_layout.setContentsMargins(0, 0, 0, 0)
121
- # self.vbox.addLayout(self.toolbar_layout)
122
-
123
- # self.init_timeframes_ui()
124
- # self.init_strategy_ui()
125
- # self.vbox.addLayout(self.hbox)
126
-
127
119
self ._chart_cache : dict [
128
120
str ,
129
121
tuple [LinkedSplits , LinkedSplits ],
@@ -143,15 +135,18 @@ def __init__(
143
135
# and the window does not? Never right?!
144
136
# self.reg_for_resize(self)
145
137
146
- @property
147
- def linkedsplits (self ) -> LinkedSplits :
148
- return self .rt_linked
149
-
150
- # XXX: strat loader/saver that we don't need yet.
138
+ # TODO: strat loader/saver that we don't need yet.
151
139
# def init_strategy_ui(self):
140
+ # self.toolbar_layout = QHBoxLayout()
141
+ # self.toolbar_layout.setContentsMargins(0, 0, 0, 0)
142
+ # self.vbox.addLayout(self.toolbar_layout)
152
143
# self.strategy_box = StrategyBoxWidget(self)
153
144
# self.toolbar_layout.addWidget(self.strategy_box)
154
145
146
+ @property
147
+ def linkedsplits (self ) -> LinkedSplits :
148
+ return self .rt_linked
149
+
155
150
def set_chart_symbols (
156
151
self ,
157
152
group_key : tuple [str ], # of form <fqsn>.<providername>
@@ -432,7 +427,7 @@ def __init__(
432
427
433
428
self .godwidget = godwidget
434
429
self .chart : ChartPlotWidget = None # main (ohlc) chart
435
- self .subplots : dict [tuple [ str , ...] , ChartPlotWidget ] = {}
430
+ self .subplots : dict [str , ChartPlotWidget ] = {}
436
431
437
432
self .godwidget = godwidget
438
433
# placeholder for last appended ``PlotItem``'s bottom axis.
@@ -1058,6 +1053,7 @@ def increment_view(
1058
1053
# breakpoint()
1059
1054
return
1060
1055
1056
+ # should trigger broadcast on all overlays right?
1061
1057
view .setXRange (
1062
1058
min = l + x_shift ,
1063
1059
max = r + x_shift ,
@@ -1107,12 +1103,6 @@ def overlay_plotitem(
1107
1103
pi .chart_widget = self
1108
1104
pi .hideButtons ()
1109
1105
1110
- # hide all axes not named by ``axis_side``
1111
- for axname in (
1112
- ({'bottom' } | allowed_sides ) - {axis_side }
1113
- ):
1114
- pi .hideAxis (axname )
1115
-
1116
1106
# compose this new plot's graphics with the current chart's
1117
1107
# existing one but with separate axes as neede and specified.
1118
1108
self .pi_overlay .add_plotitem (
@@ -1126,6 +1116,15 @@ def overlay_plotitem(
1126
1116
link_axes = (0 ,),
1127
1117
)
1128
1118
1119
+ # hide all axes not named by ``axis_side``
1120
+ for axname in (
1121
+ ({'bottom' } | allowed_sides ) - {axis_side }
1122
+ ):
1123
+ try :
1124
+ pi .hideAxis (axname )
1125
+ except Exception :
1126
+ pass
1127
+
1129
1128
# add axis title
1130
1129
# TODO: do we want this API to still work?
1131
1130
# raxis = pi.getAxis('right')
0 commit comments