import pyecharts.options as opts
from pyecharts.charts import Radar
v1 = [[290, 14641, 20, 17, 0.74, 3332,0.31]]
v2 = [[269, 14143, 26, 17, 0.64, 1250,0.32]]
(
Radar(init_opts=opts.InitOpts(width="1280px", height="720px", bg_color="#EEE8CD"))
.add_schema(
schema=[
opts.RadarIndicatorItem(name="场均补刀", max_=300),
opts.RadarIndicatorItem(name="场均金钱", max_=16000),
opts.RadarIndicatorItem(name="场均插眼", max_=30),
opts.RadarIndicatorItem(name="场均排眼", max_=30),
opts.RadarIndicatorItem(name="场均参团率", max_=1),
opts.RadarIndicatorItem(name="场均对位经济差", max_=5000),
opts.RadarIndicatorItem(name="伤害占比", max_=1),
],
splitarea_opt=opts.SplitAreaOpts(
is_show=True, areastyle_opts=opts.AreaStyleOpts(opacity=1)
),
textstyle_opts=opts.TextStyleOpts(color="#8B8878"),
)
.add(
series_name="Viper",
data=v1,
linestyle_opts=opts.LineStyleOpts(color="#FFF8DC"),
)
.add(
series_name="Eric",
data=v2,
linestyle_opts=opts.LineStyleOpts(color="#CDC8B1"),
)
.set_series_opts(label_opts=opts.LabelOpts(is_show=False))
.set_global_opts(
title_opts=opts.TitleOpts(title="ADC夏季赛数据雷达图"), legend_opts=opts.LegendOpts()
)
.render("data_radar_chart.html")
)
安装pyecharts包
pip install pyecharts
pip install pyecharts -i https://pypi.tuna.tsinghua.edu.cn/simple #使用清华源安装