mirror of
https://github.com/wassname/options_backtester.git
synced 2026-07-27 11:25:03 +08:00
Improved returns chart tooltip
This commit is contained in:
@@ -24,8 +24,7 @@ def returns_chart(report):
|
||||
|
||||
text = areas.mark_text(
|
||||
align='left', dx=5,
|
||||
dy=-5).encode(text=alt.condition(nearest, 'accumulated return:Q', alt.value(' '))).transform_calculate(
|
||||
label='datum.y + " %"')
|
||||
dy=-5).encode(text=alt.condition(nearest, 'accumulated return:Q', alt.value(' '), format='.2%'))
|
||||
|
||||
layered = alt.layer(selectors,
|
||||
points,
|
||||
|
||||
Reference in New Issue
Block a user