Travel Tips
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
使用Python中的pyecharts库读取json文件绘制漏斗图
```python import json from pyecharts import Funnel f = open('pies.json', encoding='gbk') data = json.load(f) print(data) name = data['name'] sales = data['sales'] sales_volume = data['sales_volume'] print(name, sales, sales_volume) funnel = Funnel('', width=1000) # is_label_show=True 该属性是设置是否要显示标签 label_pos是标签显示的位置 funnel.add('成交量', name, sales, is_label_show=True, label_pos='inside', label_text_color='#fff') funnel.render('funnel.html') ```
注:数据文件链接: https://pan.baidu.com/s/1VxNUyvt9kkQ2mBL-yshRBQ 密码: lusj
Sed ac lorem felis. Ut in odio lorem. Quisque magna dui, maximus ut commodo sed, vestibulum ac nibh. Aenean a tortor in sem tempus auctor
December 4, 2020 at 3:12 pm
Sed ac lorem felis. Ut in odio lorem. Quisque magna dui, maximus ut commodo sed, vestibulum ac nibh. Aenean a tortor in sem tempus auctor
December 4, 2020 at 3:12 pm
Donec in ullamcorper quam. Aenean vel nibh eu magna gravida fermentum. Praesent eget nisi pulvinar, sollicitudin eros vitae, tristique odio.
December 4, 2020 at 3:12 pm
我是 s enim interduante quis metus. Duis porta ornare nulla ut bibendum
Rosie
6 minutes ago