Travel Tips
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
使用Python中的pyecharts库读取json文件绘制折线图-柱状图
* Python代码
```python import json from pyecharts import Bar, Line, Overlap f = open('overlaps.json', encoding='gbk') data = json.load(f) date = data['date'] sales1 = data['sales1'] sales2 = data['sales2'] bar = Bar('line - bar') bar.add('line', date, sales1) line = Line('line') line.add('Line', date, sales2) overlap = Overlap() overlap.add(bar) overlap.add(line) overlap.render('overlap.html') ```
* 注:数据文件链接: https://pan.baidu.com/s/1XLmgs0bqA8kt1Ws1TwoGNQ 密码: 5hja
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