The from pyecharts import options as opts
The from pyecharts. Charts import Calendar
The begin=datetime. Date (2016, 1, 1)
End=datetime. Date (2019, 12, 31)
Data=https://bbs.csdn.net/topics/[(' 2016-1-11 ', 10), (' 2016-1-12 ', 10), (' 2016-1-13 ', 100), (' 2016-1-14 ', 1000),
(' 2016-1-15 ', 10), (' 2016-1-16 ', 10), (' 2016-1-17 ', 100), (' 2016-1-19 ', 1000),
(' 2016-11-11 ', 10), (' 2016-11-12 ', 10), (' 2016-11-13 ', 100), (' 2016-11-14 ', 1000),
(' 2016-11-15 ', 10), (' 2016-11-16 ', 10), (' 2016-11-17 ', 100), (' 2016-11-19 ', 1000),
(' 2016-2-11 ', 10), (' 2016-2-12 ', 10), (' 2016-2-13 ', 100), (' 2016-2-14 ', 1000),
(' 2016-2-15 ', 10), (' 2016-2-16 ', 10), (' 2016-2-17 ', 100), (' 2016-2-19 ', 1000),
(' 2016-1-11 ', 10), (' 2016-1-12 ', 10), (' 2016-1-13 ', 100), (' 2016-1-14 ', 1000),
(' 2016-1-15 ', 10), (' 2016-1-16 ', 10), (' 2016-1-17 ', 100), (' 2016-1-19 ', 1000)
]
Calendar=(
Calendar ()
Add (" ", the data, calendar_opts=opts. CalendarOpts (range_='2016'))
Set_global_opts (
Title_opts=opts. TitleOpts (title="calendar"),
Visualmap_opts=opts. VisualMapOpts (
Max_=1000,
Min_=0,
Received="horizontal",
Is_piecewise=True,
Pos_top="230 px",
Pos_left="100 px",
),
)
)
Calendar. The render ()
CodePudding user response:
Calendar=(Calendar (init_opts=opts. InitOpts (width="1280 px", height='350 px))
Add (" ", the data, calendar_opts=opts. CalendarOpts (range_='2016'))