用户:
WMoSo岛同号查看:2 回复:2 评论:2 创建时间:2021-07-10T20:41:51
【作品展示】

【作品介绍】
程序问你什么,你就回答。然后,程序会自动将你提供的数据渲染成图表。(再唠叨一遍,只要提供数据就行啦)
【作品源代码】
from pyecharts import Line
import os
import webbrowser
file_num=int(input('请输入统计项数'))
bt_big=input('请输入图表标题')
bt喵all=input('请输入图表副标题')
name=input('请输入折线标题')
while file_num<=0:
print('数据不得小于等于0,请重新输入')
file_num = int(input('请输入统计项数'))
file_project=[]
file=[]
i=1
for i in range(1,file_num+1):
file_project.append(str(i))
f=float(input(f'请输入第{i}项数据'))
file.append(f)
f=None
line=Line(bt_big,bt喵all)
line.add(name,file_project,file,is_label_show=False)
line.render()
webbrowser.open('file://'+os.path.realpath('render.html'))
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn