mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2025-12-22 07:54:18 +01:00
(feat) add args to dist function
This commit is contained in:
@@ -2,13 +2,13 @@ import plotly.graph_objects as go
|
|||||||
import frontend.visualization.theme as theme
|
import frontend.visualization.theme as theme
|
||||||
|
|
||||||
|
|
||||||
def create_executors_distribution_traces(config):
|
def create_executors_distribution_traces(buy_spreads, sell_spreads, buy_amounts_pct, sell_amounts_pct, total_amount_quote):
|
||||||
colors = theme.get_color_scheme()
|
colors = theme.get_color_scheme()
|
||||||
|
|
||||||
buy_spread_distributions = [spread * 100 for spread in config["buy_spreads"]]
|
buy_spread_distributions = [spread * 100 for spread in buy_spreads]
|
||||||
sell_spread_distributions = [spread * 100 for spread in config["sell_spreads"]]
|
sell_spread_distributions = [spread * 100 for spread in sell_spreads]
|
||||||
buy_order_amounts_quote = [amount * config["total_amount_quote"] for amount in config["buy_amounts_pct"]]
|
buy_order_amounts_quote = [amount * total_amount_quote for amount in buy_amounts_pct]
|
||||||
sell_order_amounts_quote = [amount * config["total_amount_quote"] for amount in config["sell_amounts_pct"]]
|
sell_order_amounts_quote = [amount * total_amount_quote for amount in sell_amounts_pct]
|
||||||
buy_order_levels = len(buy_spread_distributions)
|
buy_order_levels = len(buy_spread_distributions)
|
||||||
sell_order_levels = len(sell_spread_distributions)
|
sell_order_levels = len(sell_spread_distributions)
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ def get_default_layout(title=None, height=800, width=1800):
|
|||||||
"width": width,
|
"width": width,
|
||||||
"margin": {"l": 20, "r": 20, "t": 50, "b": 20},
|
"margin": {"l": 20, "r": 20, "t": 50, "b": 20},
|
||||||
"xaxis_rangeslider_visible": False,
|
"xaxis_rangeslider_visible": False,
|
||||||
|
"hovermode": "x unified",
|
||||||
|
"showlegend": False,
|
||||||
}
|
}
|
||||||
if title:
|
if title:
|
||||||
layout["title"] = title
|
layout["title"] = title
|
||||||
|
|||||||
Reference in New Issue
Block a user