2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 |
25 | 50 | 50.5 | 44.5 | 53.5 | 49 | 54 | 66 | 59 | 68 | 54 |
24 | 31 | 26 | 30.5 | 38 | 37 | 52 | 63 | 59 | 64.5 | 43 |
22 | 23.5 | 25.5 | 29.5 | 32 | 32 | 37 | 49 | 42 | 55 | 37 |
pyecharts0.1.9.4版本
from pyecharts import Polar
from pyecharts import Bar, Scatter3D
from pyecharts import Page
import csv
import os
page = Page()
polar = Polar("极坐标系-堆叠柱状图示例1", width=1200, height=600)
datax = []
datay = []
with open('e:\\file\hot-dog-places.csv') as f:
reader = csv.reader(f)
for datarow in reader:
datax.append(datarow)
radius = datax[0]
y1 = datax[1]
y2 = datax[2]
y3 = datax[3]
print(y1)
polar.add("A", y1, angle_data=radius, type='barRadius', is_stack=True)
polar.add("B", y2, angle_data=radius, type='barRadius', is_stack=True)
polar.add("C", y3, angle_data=radius, type='barRadius', is_stack=True)
polar.show_config()
page.add(polar)
polar = Polar("极坐标系-堆叠柱状图示例2", width=1200, height=600)
polar.add("A", y1, radius_data=radius, type='barAngle', is_stack=True)
polar.add("B", y2, radius_data=radius, type='barAngle', is_stack=True)
polar.add("C", y3, radius_data=radius, type='barAngle', is_stack=True)
polar.show_config()
page.add(polar)
page.render()
os.system("render.html")