这里用到了echarts实现图表刷新
和监听网页大小变化
mounted() {
this.draw();
window.addEventListener('resize', this.draw)
},
beforeRouteLeave...
yekong
4周前 (12-31) 98℃
1喜欢
this.chart.clear();
this.chart.resize();
...
yekong
4周前 (12-31) 82℃
0喜欢
yAxis: {
axisTick: {
show: false
},
},
...
yekong
1个月前 (12-26) 125℃
1喜欢
yAxis: {
axisLine:{
lineStyle:{
color:'#2b5050',
width:1,//这里是为了突出显示加上的
...
yekong
1个月前 (12-26) 131℃
1喜欢
xAxis: {
data: data,
axisLabel: {
show: true,
textStyle: {
color: '#c3dbff', //更改坐标轴文字颜色
...
yekong
1个月前 (12-26) 106℃
0喜欢
lines2() {
let myChart = this.$echarts.init(this.$refs.myChart2)
// 绘制图表
myChart.setOptio
n({
"textStyle...
yekong
1个月前 (12-24) 91℃
0喜欢
类似这样的效果
drawLine() {
let myChart = this.$echarts.init(this.$refs.charts)
var colors = ["rgba(79, 199, 234, 1)", &quo...
yekong
1个月前 (12-24) 74℃
0喜欢
效果
用到的插件 建议最新版
<script src="js/echarts.min.js"></script>
<script src="js/echarts-liquidfill.js"...
yekong
1个月前 (12-19) 77℃
0喜欢
"grid": {
"top": "20",
"left": "10&quo...
yekong
1个月前 (12-19) 76℃
0喜欢
legend: {
y:'55%',
textStyle:{
fontSize: 14,//字体大小
...
yekong
1个月前 (12-19) 87℃
0喜欢