import json
from pyecharts import Pie
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)
pie = Pie('', width=800)
pie.add('', name, sales, sales_volume, is_label_show=True)
pie.render('pie.html')