如何将pyecharts数据视图文本和按钮从中文更改为英文?header and the 2 red buttons are on Chinese language.
下面是我使用的代码:
line_chart_Traffic_Vol_DL =
String(). add_xaxis(df3.Date.tolist())。add_yaxis('Traffic_Vol_DL',df3 ['Traffic_Vol_DL']. tolist(),is_smooth = True,is_connect_nones = True,linestyle_opts = opts. LineStyleOpts(color ='blue',width = 1),markline_opts = opts. MarkLineOpts(data =[opts. MarkLineItem(type_='average ')]),markpoint_opts = opts。MarkPointOpts(data =[opts. MarkPointItem(type_='max',name ='Max '),opts. MarkPointItem(type_='min',name ='Min ')]),). set_series_opts(areastyle_opts = opts. AreaStyleOpts(opacity = 0.05,color ='#c6f'),label_opts = opts. LabelOpts(is_show = False))。set_global_opts(title_opts = opts. TitleOpts(title ='Traffic_Vol_DL',subtitle ='GB'),datazoom_opts =[opts. DataZoomOpts(),opts. DataZoomOpts(type_='inside')],tooltip_opts = opts. TooltipOpts(trigger ='axis'),legend_opts = opts. LegendOpts(is_show = False),toolbox_opts = opts。ToolboxOpts(is_show = True,feature =' restore':'title ':' Restore'},'saveAsImage':'title':'Save '},' dataView ':'title ':' data view'}}))#datazoom_opts = opts. DataZoomOpts(orient ="vertical"),#"dataZoom":{"yAxisIndex ":"none "},
将2个红色按钮和标题上的语言从中文更改为英文
1条答案
按热度按时间kmbjn2e31#
为了将语言从中文更改为英语,我做了以下操作,将
set_global_opts
更改为:在指定的选项下,查找“标题”,当鼠标悬停在“标题”上时,您可以更改文本以匹配您想要的内容。PyeCharts GlobalOpts