Browse Source

图表动画

master
453530270@qq.com 3 years ago
parent
commit
b2fa06239d
  1. 13
      src/views/TycView.vue

13
src/views/TycView.vue

@ -358,8 +358,6 @@ export default {
}, },
// 24H // 24H
cgsf_line() { cgsf_line() {
// console.log(this.ecbardata[0].xname)
var chartDom = document.getElementById('gcins_charts'); var chartDom = document.getElementById('gcins_charts');
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
@ -432,6 +430,10 @@ export default {
barWidth: '10%', barWidth: '10%',
barCategoryGap: '60%', barCategoryGap: '60%',
stack: 1, stack: 1,
// animation
animationDurationUpdate:3000,
animationEasingUpdate:'quintcInOut',
itemStyle: { itemStyle: {
normal: { normal: {
barBorderRadius: [30, 30, 0, 0], barBorderRadius: [30, 30, 0, 0],
@ -452,7 +454,6 @@ export default {
zlevel: 11 zlevel: 11
}, },
{ {
// name: '',
type: 'scatter', type: 'scatter',
stack: 1, stack: 1,
xAxisIndex: 0, xAxisIndex: 0,
@ -486,6 +487,12 @@ export default {
} }
option && myChart.setOption(option); option && myChart.setOption(option);
//
setInterval(()=>{
myChart.clear()
option && myChart.setOption(option);
},4000);
}, },
// //
cg_line() { cg_line() {

Loading…
Cancel
Save