forked from pyecharts/pyecharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheffectscatter_example.py
46 lines (37 loc) · 1.3 KB
/
effectscatter_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# coding=utf-8
from example.commons import Collector, Faker
from pyecharts import options as opts
from pyecharts.charts import EffectScatter, Page
from pyecharts.globals import SymbolType
C = Collector()
@C.funcs
def effectscatter_base() -> EffectScatter:
c = (
EffectScatter()
.add_xaxis(Faker.choose())
.add_yaxis("", Faker.values())
.set_global_opts(title_opts=opts.TitleOpts(title="EffectScatter-基本示例"))
)
return c
@C.funcs
def effectscatter_splitline() -> EffectScatter:
c = (
EffectScatter()
.add_xaxis(Faker.choose())
.add_yaxis("", Faker.values())
.set_global_opts(
title_opts=opts.TitleOpts(title="EffectScatter-显示分割线"),
xaxis_opts=opts.AxisOpts(splitline_opts=opts.SplitLineOpts(is_show=True)),
yaxis_opts=opts.AxisOpts(splitline_opts=opts.SplitLineOpts(is_show=True)),
)
)
return c
@C.funcs
def effectscatter_symbol() -> EffectScatter:
c = (
EffectScatter()
.add_xaxis(Faker.choose())
.add_yaxis("", Faker.values(), symbol=SymbolType.ARROW)
).set_global_opts(title_opts=opts.TitleOpts(title="EffectScatter-不同Symbol"))
return c
Page().add(*[fn() for fn, _ in C.charts]).render()