class pyecharts.options.InitOpts
bar = (
Bar(init_opts=opts.InitOpts(theme=ThemeType.LIGHT))
.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"])
.add_yaxis("商家A", [5, 20, 36, 10, 75, 90])
.add_yaxis("商家B", [15, 6, 45, 20, 35, 66])
.set_global_opts(title_opts=opts.TitleOpts(title="主标题", subtitle="副标题"))
)
class InitOpts(BasicOpts):
def __init__(
self,
str = "900px",
height: str = "500px",
chart_id: Optional[str] = None,
renderer: str = RenderType.CANVAS,
page_title: str = CurrentConfig.PAGE_TITLE,
theme: str = ThemeType.WHITE,
bg_color: Union[str, dict] = None,
js_host: str = "",
animation_opts: Union[AnimationOpts, dict] = AnimationOpts(),
):