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.