pyecharts/example/image_example.py
陈键冬 dc7617f7f7
PR: add pictorialbar chart type and fix some bugs (#1158)
* Add: pictorialBar chart

* Update: 减少代码量

* Add: 为 Gauge 新增配置项

* Format: code

* Update: example

* Add: test

* Fix: test

* Fix: broken test

* Add: more examples

* Update: add itemstyle_opts for MarkPointItem

* Fix: 修复 geo data 参数逻辑判断

* Fix: CurrentConfig.ONLINE_HOST 表现不一致的问题

* Update: example

* Update: GeoChartBase 子类处理 data 逻辑
2019-06-01 15:14:51 +08:00

22 lines
605 B
Python

from pyecharts.components import Image
from pyecharts.options import ComponentTitleOpts
def image_base() -> Image:
image = Image()
img_src = (
"https://user-images.githubusercontent.com/19553554/396123"
"58-499eb2ae-4f91-11e8-8f56-179c4f0bf2df.png"
)
image.add(
src=img_src,
style_opts={"width": "200px", "height": "200px", "style": "margin-top: 20px"},
).set_global_opts(
title_opts=ComponentTitleOpts(title="Image-基本示例", subtitle="我是副标题支持换行哦")
)
return image
image_base().render()