|
@@ -144,10 +144,7 @@ class TransactionEditor(FocusWidget):
|
|
|
float(x) for x in df[['avg','min','max']].iloc[0]
|
|
|
]
|
|
|
self.rating.update_rating(_avg, _min, _max, unit, price=price, quantity=quantity)
|
|
|
- df = df.sort_values('ts_raw', ascending=True)
|
|
|
- #print(df)
|
|
|
- #input()
|
|
|
- # need to sort by ts and take last 45 items
|
|
|
+ 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: (
|
|
@@ -275,7 +272,7 @@ class TransactionEditor(FocusWidget):
|
|
|
lambda x: _widgets[x] if x is not None else Divider(),
|
|
|
bottom_pane
|
|
|
)),
|
|
|
- (self.graph.width, Pile([
|
|
|
+ (self.graph.total_width, Pile([
|
|
|
LineBox(
|
|
|
AttrMap(components['badge'], 'badge'),
|
|
|
title="Current Price", title_align='left',
|