rows.insert(0,headers)
c=(
Pie()
.add_dataset(
source=rows
)
.add(
"",
data_pair=[],
center=["20%", "30%"],
radius=[35, 80],
encode={"itemName": "商品", "value": "商家A"},
)
.add(
"",
data_pair=[],
center=["60%", "30%"],
radius=[35, 80],
encode={"itemName": "商品", "value": "商家B"},
)
.add(
"",
data_pair=[],
center=["20%", "80%"],
radius=[35, 80],
encode={"itemName": "商品", "value": "商家C"},
)
.set_colors(["blue", "green", "yellow", "red", "pink", "orange", "purple"])
)
c.render_notebook()
11-12
3万+
07-17
1万+