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! 