Comments (3)
我按照常见问题中的第三点的解决方法,去展示两个图表,但是运行起来的时候只显示了第一个图表,
html部分
js部分:
let RadialChart = ''
let RadialOption = {}let HorizontalChart = ''
let HorizontalOption = {}js部分____data中的数据:
RadialEc: { //温度的图表配置项
lazyLoad: true,
},
HorizontalEc: { //水平的图表配置项
lazyLoad: true,
}
onload:
onLoad(option) {
setTimeout(() => {
// this.ec.option.series[0].data = [1, 2, 3, 4, 5, 6, 7];
this.initRadial()
console.log("Radial图表加载啦");
}, 1000);
setTimeout(() => {
this.initHorizontal()
console.log("Horizontal图表加载啦")
}, 1500)
},methods部分:
//初始化Radial图表
initRadialChart(canvas, width, height, canvasDpr) {
// console.log(canvas, width, height, canvasDpr)
RadialChart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(RadialChart)
RadialChart.setOption(RadialOption)
return RadialChart
},
//初始化Horizontal图表
initHorizontalChart(canvas, width, height, canvasDpr) {
// console.log(canvas, width, height, canvasDpr)
HorizontalChart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(HorizontalChart)
HorizontalChart.setOption(HorizontalOption)
return HorizontalChart
},//加载radial数据 initRadial: function() { RadialOption ={ 我的一些相关图表配置 }; this.$refs.canvas.init(this.initRadialChart) }, //加载Horizontal数据 initHorizontal: function() { HorizontalOption = { 我的一些相关图表配置 }; this.$refs.canvas.init(this.initHorizontal) },
可以多个的,我自己项目里一个页面,4,5个图,是不是被挡住了
from echarts-wx-uniapp.
我按照常见问题中的第三点的解决方法,去展示两个图表,但是运行起来的时候只显示了第一个图表,
html部分
js部分:
let RadialChart =''
let RadialOption = {}
let HorizontalChart =''
let HorizontalOption = {}
js部分____data中的数据:
RadialEc:{//温度的
图表配置项lazyLoad:true,
},
HorizontalEc:{//水平的
图表配置项lazyLoad:true,
}
onload:
onLoad(option){
setTimeout(() => {
// this.ec.option.series [0] .data = [1、2、3、4、5、6、7];
this.initRadial()
console.log(“ Radial图表加载啦”) ;
},1000);
setTimeout(()=> {
this.initHorizontal()
console.log(“ Horizontal Chart加载啦”)
},1500)
},
方法部分:
//初始化Radial图表
initRadialChart(canvas, width, height, canvasDpr) {
// console.log(canvas, width, height, canvasDpr)
RadialChart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(RadialChart)
RadialChart.setOption(RadialOption)
return RadialChart
},
//初始化Horizontal图表
initHorizontalChart(canvas, width, height, canvasDpr) {
// console.log(canvas, width, height, canvasDpr)
HorizontalChart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(HorizontalChart)
HorizontalChart.setOption(HorizontalOption)
return HorizontalChart
},//加载radial数据 initRadial: function() { RadialOption ={ 我的一些相关图表配置 }; this.$refs.canvas.init(this.initRadialChart) }, //加载Horizontal数据 initHorizontal: function() { HorizontalOption = { 我的一些相关图表配置 }; this.$refs.canvas.init(this.initHorizontal) },
可以多个的,我自己项目里一个页面,4,5个图,是不是被挡住了
您能发个例子么?如果挡住了有解决方案么?
我的微信小程序开发工具控制台不知道为什么打印了这么多个提示
from echarts-wx-uniapp.
你怎么会有这么多日志打印
from echarts-wx-uniapp.
Related Issues (15)
- tooltip中formatter不支持回调函数 HOT 2
- 请问series.type支持custom吗? HOT 1
- 我想问一下axisLabel.formatter为什么无效 HOT 2
- x轴的数据是日期时,当y轴有值的时候才显示对应的x轴的值
- Y轴的文字axisLabel 下配置 formatter 不生效 HOT 2
- 大佬,自定义的导航栏,使用了uni-app 的 cover-view 包裹了,还是不能遮挡echarts 的图表 HOT 1
- option HOT 1
- 发现个问题,页面通过v-if显示的时候 xy周的字体变粗了 HOT 2
- markLine设置多条,出现报错 HOT 7
- Map 类型的时候无法显示出来地图 HOT 1
- 多图被悬浮无法滚动 HOT 5
- 如何调用dispose销毁实例 HOT 2
- 请问一下 map 类型的如何在uniapp中使用,地图出不来
- 请问formatter回调函数如何使用 HOT 3
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-wx-uniapp.