We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
方法一 :: 降低版本: pip install 'pyecharts<1' 方法二 :: 使用兼容写法,例如:
pip install 'pyecharts<1'
def init_geo(title, subtitle, title_color, background_color, title_pos='center', width=1200, height=600): # 兼容新旧版本的pyecharts try: from pyecharts.charts import Geo from pyecharts.options import InitOpts, TitleOpts from pyecharts.options.series_options import TextStyleOpts geo = Geo( init_opts=InitOpts( width=width, height=height, bg_color=background_color, ) ) geo.set_global_opts( TitleOpts( title=title, subtitle=subtitle, text_align=title_pos, title_textstyle_opts=TextStyleOpts(color=title_color), ) ) return geo except ImportError: from pyecharts import Geo return Geo( title, subtitle, title_color=title_color, background_color=background_color, title_pos=title_pos, width=width, height=height, )
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: