Qian Gong
Qian Gong

Reputation: 1

overlap of sticks and number in pyecharts.Gauge

When drawing gauge using pyecharts, there is overlap between sticks and number. a gauge

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


(
    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}%"),
    )
    .set_series_opts(
        axisline_opts=opts.AxisLineOpts(
            linestyle_opts=opts.LineStyleOpts(
                color=[[0.3, "#67e0e3"], [0.7, "#37a2da"], [1, "#fd666d"]], width=30
            )
        )
    )
    .render("gauge_change_color.html")
)

I have tried to move the sticks but failed.

Upvotes: 0

Views: 11

Answers (0)

Related Questions