惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
I
InfoQ
F
Full Disclosure
美团技术团队
Martin Fowler
Martin Fowler
量子位
V
V2EX
小众软件
小众软件
爱范儿
爱范儿
宝玉的分享
宝玉的分享
aimingoo的专栏
aimingoo的专栏
有赞技术团队
有赞技术团队
F
Fortinet All Blogs
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
IT之家
IT之家
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
T
Threat Research - Cisco Blogs
T
Threatpost
P
Proofpoint News Feed
腾讯CDC
博客园 - 司徒正美
Jina AI
Jina AI
The Hacker News
The Hacker News
P
Privacy & Cybersecurity Law Blog
L
LINUX DO - 热门话题
S
Securelist
U
Unit 42
T
The Exploit Database - CXSecurity.com
博客园 - Franky
NISL@THU
NISL@THU
D
Docker
The GitHub Blog
The GitHub Blog
Latest news
Latest news
S
Schneier on Security
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
P
Palo Alto Networks Blog

博客园 - 微宇宙

js-金额相加 小程序- 字符数据换行 antd-输入框去掉光晕 大屏缩放布局 大屏显示 echarts - 原型的方向盘动画 小程序- 自定义导航栏组件封装 小程序-echart动画git仓库 小程序- 隐私协议完善 小程序- 日期picker样式问题 echart - 折线图显示设置 echart - 移动端提示内容无阴影 echart 柱状图 - 零界点 正负方向展示 小程序 - 导航栏 图标设置 小程序 - 错误问题记录 react项目全屏功能 react-大屏显示antd浮窗 React andt库设置主题色彩 React闭包陷阱 git 操作 小程序 - 订阅消息通知 小程序-分包 mysql安装使用 redis安装使用 echart 格式化水平坐标 tooltip数据 小程序-模板用法 小程序-登录验证码的加载方式 工作代码规范 小程序-锚链接 小程序-菜单tabbar设置 小程序-分享功能 小程序-树形结构 array数组 js 小程序-标题自定义设置 小程序-拨打电话
小程序-图表
微宇宙 · 2025-12-03 · via 博客园 - 微宇宙

如i果要封装图表组件,可以基于这个案例,每次传入的是一个对象即可。

 import * as echarts from '../echarts';

this

.ecComponent = this.selectComponent('#chart'); this.ecComponent.init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr // new }); chart.setOption(c_option); this.chart = chart; this.setData({ isLoaded: true, }); // 注意这里一定要返回 chart 实例,否则会影响事件处理等 return chart; });

其中,下载图表定制化的 线和壮壮图js,本地运行报错。

// 下载好替换之后,提示什么TypeError: t.domTarget.addEventListener is not a functionfunction Ii(t, e, n, i) {
  t.mounted[e] = n, t.listenerOpts[e] = i, t.domTarget.addEventListener(e, n, i)
}
// 直接改成
function Ii(t, e, n, i) {
  t.mounted[e] = n, t.listenerOpts[e] = i, 1
}
// 也就是删掉 ,
t.domTarget.addEventListener(e, n, i)

https://github.com/ecomfe/echarts-for-weixin/blob/82e6cdfe5347265c04cced222bd6398dcb6eb279/pages/lazyLoad/index.js#L10