Yesterday, I sat down to work through the documentation and make a component, here’s where I am:
https://github.com/randyzwitch/streamlit-victory
https://formidable.com/open-source/victory/
Communication is currently Python → React, but if I can think about how to make it bi-directional I will. This is only 8-hours or so of work, and I don’t know JS, so it’s been a little bit slow. Hoping to make more progress in the coming days.
There is an example in the __init__.py
file:
data = [
{"quarter": "1", "earnings": 13000},
{"quarter": "2", "earnings": 16500},
{"quarter": "3", "earnings": 14250},
{"quarter": "4", "earnings": 19000},
]
bar_chart = victory_bar(
data,
"quarter",
"earnings",
alignment="start",
animate=False,
width=500,
horizontal=True,
barWidth=None,
barRatio=0.2,
sortKey=None,
sortOrder=None,
scale=None,
)
pie_chart = victory_pie(data, "quarter", "earnings",)
scatter_chart = victory_scatter(data, "quarter", "earnings",)
Which creates the following Streamlit app:
A lot of work ahead!