Hi guys,
Iāve tried many options to render any PyEchartsā Tree charts in Streamlit, yet no luckā¦
https://gallery.pyecharts.org/#/Tree/README
Has anyone ever succeeded? @andfanilo maybe?
Thanks,
Charly
Hi guys,
Iāve tried many options to render any PyEchartsā Tree charts in Streamlit, yet no luckā¦
https://gallery.pyecharts.org/#/Tree/README
Has anyone ever succeeded? @andfanilo maybe?
Thanks,
Charly
Bonjour !
Donāt forget to remove the .render("tree_base.html")
part if you are copy-pasting the code to streamlit-echarts
from pyecharts import options as opts
from pyecharts.charts import Tree
from streamlit_echarts import st_pyecharts
data = [
{
"children": [
{"name": "B"},
{
"children": [{"children": [{"name": "I"}], "name": "E"}, {"name": "F"}],
"name": "C",
},
{
"children": [
{"children": [{"name": "J"}, {"name": "K"}], "name": "G"},
{"name": "H"},
],
"name": "D",
},
],
"name": "A",
}
]
c = (
Tree()
.add("", data)
.set_global_opts(title_opts=opts.TitleOpts(title="Tree-åŗę¬ē¤ŗä¾"))
)
st_pyecharts(c)
Fanilo
Perfect, thanks!
Next step is to convert raw JSON (or CSV) to the flare.json format.
Do you know if thereās any way to do it programmatically?
Few solutions Iāve just stumbled upon which Iāll have to try after work! :):
Thanks,
Charly
Well that would make a great hardcore interview question for my future Python interns, thanks yeah it looks like something youāre going to need to dive in after workā¦good luck!
Haha! I canāt wait to delve into this! Iāll post my findings in here!
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.