Comments (4)
为什么想直接传 options?有什么好处?这样会限制原有 echarts 的其他接口
from echarts-for-weixin.
感谢回复。
原来还有其他接口,我当时只看到有 lazyLoad 和 onInit 这两个接口配置。
初衷是不想用太繁琐的初始化方法,直接传一个 options 给组件渲染完就好。然后在某些情况下,通过 data 传 function 会有困难,也违背 data 的语义,感觉不优雅,大致就这样。
from echarts-for-weixin.
如果你有特殊需求可以照这个思路自己再封装一次,但通用的还是需要兼容一般的 echarts 初始化的做法
from echarts-for-weixin.
@anchengjian 您好,我在mpvue中使用的是您推荐的 那种方法。。由于图表较多,我在utils中把options 封装了一下,每个页面进行获取,然后赋值给ec.options,但是数据改变后,我如果在mounted中初始化 echart, 数据图表是空白(没有绘制)。。在created中初始化是可以显示的。。。疑问是:为什么在mounted()中进行数据的初始化后没有绘制图表?
from echarts-for-weixin.
Related Issues (20)
- 小程序使用series-custom renderItem报错
- 小程序横屏现在支持了吗?
- 微信小程序 echarts tooltip设置extraCssText不生效
- 热力图数据量太大导致tootip失效
- 热力图数据量太大3万条以上点击显示tootip失效
- 结合echarts使用
- 微信小程序的tooltips卡顿问题有解决吗? HOT 2
- 柱形图和折线图,不能支持自定义样式
- 用import * as echarts from '../../../ec-canvas/ec-canvas';在js引入会报错APP-SERVICE-Engine:Please do not register multiple Pages in
- 使用markline中的coord控制台会报Cannot read property 'coord' of undefined,并且无法正常显示markline HOT 2
- 最新的官方版本支持了tooltip吗? HOT 2
- TypeError: Image is not a constructor HOT 1
- 有支持 Skyline 模式的计划吗?目前有点小问题 HOT 2
- 两个页面的echarts,一个页面滑动跳转到另一个页面,这个页面的echarts也跟着动到了上个页面echarts滑动到的位置
- 我想用旧版本的该怎么办
- series折线图 symbolSize的样式不正常 HOT 1
- 加上小程序"miniprogramRoot": "miniprogram/",就无法正常绘制图表了
- 这个改成uniapp版的微信小程序可以么 vue3的 HOT 1
- 小程序中使用PictorialBar象形柱图,普通写法和懒加载,ios系统都会闪退,安卓系统不会闪退
- 能否提供ts支持?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echarts-for-weixin.