echarts lines effect 遇到拖尾效果問題,求解答?


先看我的問題效果

 

 

官方實例效果

 

 

難道是版本問題嗎?

有路過的大神要知道?

我的代碼如下

{
        backgroundColor: '#09132c',
        visualMap: [{
          type: 'piecewise', // 分段式
          pieces: [
            { min: 20000, label: '>2萬', color: '#0231BA' },
            { min: 10000, max: 20000, label: '1萬-2萬', color: '#001A71' },
            { max: 10000, label: '<1萬', color: '#021d55' }
          ]
        }],
        geo: {
          map: 'china',
          zoom: 1.22, // 設置比例比sesies的大,出現外圍地圖疊加效果
          emphasis: { // 高亮狀態下的多邊形和標簽樣式
            label: {
              show: false
            },
            itemStyle: {
              areaColor: '#00FFFF'
            }
          },
          regions: [{
            name: '南海諸島',
            itemStyle: {
              normal: {
                opacity: 0,
                label: {
                  show: false,
                  color: '#009cc9'
                }
              }
            }
          }],
          itemStyle: { // 圖形樣式
            areaColor: '#2AB8FF',
            borderWidth: 2,
            borderColor: '#2AB8FF',
            shadowColor: '#2AB8FF',
            shadowBlur: 10,
            shadowOffsetX: 2,
            shadowOffsetY: 3
          }
        },
        series: [{
          type: 'map',
          map: 'china',
          zoom: 1.2,
          data: [
            {
              name: '廣東',
              value: 8000
            },
            {
              name: '雲南',
              value: 15000
            },
            {
              name: '青海',
              value: 28000
            }
          ],
          label: {
            show: true,
            color: '#fff'
          },
          itemStyle: { // 圖形樣式
            areaColor: '#274d68',
            borderWidth: 1,
            borderColor: '#2AB8FF',
            shadowColor: 'rgba(0, 10, 52, 1)',
            shadowBlur: 10
          },
          emphasis: { // 高亮狀態下的多邊形和標簽樣式
            label: {
              show: false
            },
            itemStyle: {
              areaColor: '#2AB8FF'
            }
          }
        },
        {
          name: 'mapLines',
          type: 'lines',
          zlevel: 1,
          symbol: ['none', 'arrow'],
          symbolSize: 10,
          effect: {
            show: true,
            period: 5, // 箭頭指向速度,值越小速度越快
            trailLength: 0.4, // 特效尾跡長度[0,1]值越大,尾跡越長重
            symbol: 'arrow', // 箭頭圖標
            symbolSize: 10 // 圖標大小
          },
          lineStyle: {
            normal: {
              color: '#1DE9B6',
              width: 1, // 線條寬度
              opacity: 0.1, // 尾跡線條透明度
              curveness: 0.3 // 尾跡線條曲直度
            }
          },
          data: [{
            // fromName: '北京',
            // toName: '河南',
            coords: [[118.8062, 31.9208], [98.8062, 28.9208]],
            lineStyle: {
              color: '#4ab2e5'
            }
            // value: '2000'
          }, {
            coords: [[118.8062, 31.9208], [98.8062, 38.9208]],
            lineStyle: {
              color: '#4ab2e5'
            }
          }]
        }
        ]
      }
View Code

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM