Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 615 Bytes

gauge.md

File metadata and controls

29 lines (21 loc) · 615 Bytes

pyecharts 代码 / 效果

import pyecharts.options as opts
from pyecharts.charts import Gauge

"""
Gallery 使用 pyecharts 1.1.0
参考地址: https://echarts.apache.org/examples/editor.html?c=gauge

目前无法实现的功能:

1、暂无
"""

(
    Gauge()
    .add(series_name="业务指标", data_pair=[["完成率", 55.5]])
    .set_global_opts(
        legend_opts=opts.LegendOpts(is_show=False),
        tooltip_opts=opts.TooltipOpts(is_show=True, formatter="{a} <br/>{b} : {c}%"),
    )
    .render("gauge.html")
)
<iframe width="100%" height="800px" src="Gauge/gauge.html"></iframe>