|
@@ -146,11 +146,7 @@ class TransactionEditor(FocusWidget):
|
|
|
self.rating.update_rating(_avg, _min, _max, unit, price=price, quantity=quantity)
|
|
|
df = df.sort_values('ts_raw', ascending=True).truncate(after=self.graph._canvas_width-1)
|
|
|
self.graph.set_data(
|
|
|
- df[['ts_raw','$/unit']].apply(
|
|
|
- lambda x, axis=None: (
|
|
|
- x['ts_raw'].timestamp(), float(x['$/unit'])
|
|
|
- ), axis=1
|
|
|
- ),
|
|
|
+ df[['$/unit']].apply(lambda x: (float(x['$/unit']),), axis=1),
|
|
|
df['max'].apply(float).iloc[0],
|
|
|
labels=[_min, _avg, _max]
|
|
|
)
|
|
@@ -200,7 +196,7 @@ class TransactionEditor(FocusWidget):
|
|
|
}
|
|
|
self.graph = FlowBarGraphWithVScale(
|
|
|
50, 14,
|
|
|
- ['bg','badge_highlight','popup_focus', ],
|
|
|
+ ['bg','popup_focus', ],
|
|
|
hatt=['dark red', 'dark red', 'dark red']
|
|
|
)
|
|
|
self.rating = Rating(dict(filter(
|
|
@@ -272,12 +268,15 @@ class TransactionEditor(FocusWidget):
|
|
|
lambda x: _widgets[x] if x is not None else Divider(),
|
|
|
bottom_pane
|
|
|
)),
|
|
|
- (self.graph.total_width, Pile([
|
|
|
+ (self.graph.total_width+2, Pile([
|
|
|
LineBox(
|
|
|
AttrMap(components['badge'], 'badge'),
|
|
|
title="Current Price", title_align='left',
|
|
|
),
|
|
|
- self.graph,
|
|
|
+ LineBox(
|
|
|
+ self.graph,
|
|
|
+ title="Historic Price", title_align='left'
|
|
|
+ ),
|
|
|
])),
|
|
|
])
|
|
|
})
|