Python可视化神器pyecharts绘制仪表盘
作者:王小王_123??????? 时间:2021-12-29 15:57:53
仪表盘
仪表盘的效果我只能说炫酷而已,如果想要运用在实际的场景中,我其实也不清楚那个场景比较适合,但是pyecharts毕竟是炫酷可视化的利器,炫酷自然也就有它了。
小汽车仪表盘是长这样的,下面我们来看看pyecharts的仪表盘是怎么样子的。
仪表盘模板系列
假期剩余额度
import pyecharts.options as opts
from pyecharts.charts import Gauge
(
Gauge(init_opts=opts.InitOpts(width="1200px", height="600px"))
.add(series_name="", data_pair=[["", 5.5]])
.set_global_opts(
title_opts=opts.TitleOpts(title="假期剩余率"),
legend_opts=opts.LegendOpts(is_show=False),
tooltip_opts=opts.TooltipOpts(is_show=True, formatter="{a} <br/>{b} : {c}%"),
)
.render("完成率.html")
)
任务完成率
from pyecharts import options as opts
from pyecharts.charts import Gauge
c = (
Gauge()
.add("", [("", 96.6)]
)
.set_global_opts(title_opts=opts.TitleOpts(title="任务完成率"))
.render("任务完成率.html")
)
多色仪表盘
from pyecharts import options as opts
from pyecharts.charts import Gauge
c = (
Gauge()
.add(
"",
[("", 55.5)],
axisline_opts=opts.AxisLineOpts(
linestyle_opts=opts.LineStyleOpts(
color=[(0.3, "#67e0e3"), (0.7, "#37a2da"), (1, "#fd666d")], width=30
)
),
)
.set_global_opts(
title_opts=opts.TitleOpts(title="完成率"),
legend_opts=opts.LegendOpts(is_show=False),
)
.render("多色仪表盘.html")
)
仪表盘内部字体添加
来源:https://blog.51cto.com/u_15172991/5428060
标签:Python,可视化,pyecharts,绘制,仪表盘
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
数据库名词解释
2008-09-12 17:28:00
ASP 使用jqGrid实现读写删的代码(json)
2010-03-07 17:26:00
Python实现的特征提取操作示例
2023-02-07 06:08:04
Python命令行参数解析工具 docopt 安装和应用过程详解
2022-01-15 05:31:05
python中dict()的高级用法实现
2022-06-16 23:24:29
![](https://img.aspxhome.com/file/2023/2/84122_0s.png)
Tensorflow训练模型默认占满所有GPU的解决方案
2023-02-11 12:05:11
![](https://img.aspxhome.com/file/2023/2/102872_0s.png)
PHP的PDO大对象(LOBs)
2023-06-07 06:45:36
960网格系统
2009-02-17 12:22:00
![](https://img.aspxhome.com/file/UploadPic/20092/17/960-grid-system-092-54s.jpg)
python如何运行js语句
2022-04-10 02:34:27
![](https://img.aspxhome.com/file/2023/3/81603_0s.png)
Laravel实现登录跳转功能
2023-06-14 23:35:40
![](https://img.aspxhome.com/file/2023/9/55549_0s.png)
python爬取淘宝商品详情页数据
2021-05-28 14:38:08
![](https://img.aspxhome.com/file/2023/0/75240_0s.png)
PHP笛卡尔积实现算法示例
2023-09-08 19:58:09
如何使用ASP来读写注册表
2007-09-20 13:08:00
SQL语句练习实例之七 剔除不需要的记录行
2011-11-03 16:50:51
[译文]The seven rules of Unobtrusive JavaScript
2008-09-29 12:10:00
Access数据库操作中出现的怪现象
2008-04-24 14:22:00
JS实现pasteHTML兼容ie,firefox,chrome的方法
2023-09-21 01:55:10
使用JavaScript访问XML数据
2023-06-29 22:19:08
谈谈我的“分离”观
2010-08-31 14:47:00
python3基于OpenCV实现证件照背景替换
2022-06-08 02:16:53