=========
from pyecharts import options as opts
from pyecharts.charts import Gauge
c = (
Gauge()
.add(
“业务指标”,
[(“完成率”, 55.5)],
split_number=20,
axisline_opts=opts.AxisLineOpts(
linestyle_opts=opts.LineStyleOpts(
color=[(0.3, “#00CDCD”), (0.7, “#CDBE70”), (1, “#00EE00”)], width=30
)
),
detail_label_opts=opts.LabelOpts(formatter=“{value}”),
)
.set_global_opts(
title_opts=opts.TitleOpts(title=“Gauge-分割段数-Label”),
legend_opts=opts.LegendOpts(is_show=False),
)
)
c.render_notebook()
如果想让仪表盘的刻度变成5,那么我们可以把它分成20份(split_number=20)
四、改变仪表盘的大小
==========
from pyecharts import options as opts
from pyecharts.charts import Gauge
c = (