日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > vue >内容正文

vue

echarts迁徙图 vue_【可视化插件】Vue项目中Echarts流向图迁徙图实现

發布時間:2023/12/20 vue 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 echarts迁徙图 vue_【可视化插件】Vue项目中Echarts流向图迁徙图实现 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

public render() { //圖表繪制方法

this.chart.clear();

const isMock = !this.items.length;

const items = isMock ? Visual.mockItems : this.items;

this.container.style.opacity = isMock ? '0.3' : '1';

const options = this.properties;

let planePath = options.effect ? options.symbol : options.symbolStyle;

let departureValue = isMock ? ['北京', '上海', '廣州市'] : this.legendData;

let color = isMock ? ['#a6c84c', '#ffa022', '#46bee9'] : options.palette;

var series = [];

items.map((item: any, i: number) => {

if (item.length) {

let j = i % color.length;

series.push({

name: item[0].fromName,

type: 'lines',

zlevel: 1,

effect: {

show: true,

period: options.period,

trailLength: 0.7,

color: color[j],

symbolSize: 4},

lineStyle: {

normal: {

color: color[j],

width: 0.1,

curveness: 0.2 } },

data: item },

{

name: item[0].fromName,

type: 'lines',

zlevel: 2,

symbol: ['none', 'arrow'],

symbolSize: 10,

effect: {

show: true,

period: options.period,

trailLength: 0,

symbol: planePath,

symbolSize: options.symbolSize },

lineStyle: {

normal: {

color: color[j],

width: 1,

opacity: 0.6,

curveness: 0.2 } },

data: item},

{

name: item[0].fromName,

type: 'effectScatter',

coordinateSystem: 'geo',

zlevel: 2,

rippleEffect: {

brushType: 'stroke' },

label: {

normal: {

show: true,

position: "right", //顯示位置

offset: [5, 0], //偏移設置

formatter: "{b}" //圓環顯示文字 },

emphasis: {

show: true } },

symbolSize: options.pointSize,

itemStyle: {

normal: {

color: color[j] } },

data: this.parseData(item) } ); } });

var option = {

tooltip: {

trigger: 'item',

formatter: function (params, ticket, callback) {

if (params.seriesType == "lines") {

return params.data.fromName + " --> " + params.data.toName + "
" + params.data.value;

} else {

return params.name; } } },

legend: {

show: options.showLegend,

orient: 'vertical',

top: 'bottom',

left: 'right',

data: departureValue,

textStyle: {

color: '#fff' },

selectedMode: 'multiple', },

geo: {

map: options.mapName,

label: {

emphasis: {

sfalsehow: true,

color: '#fff' } },

roam: options.roam,

layoutCenter: ["50%", "50%"], //地圖位置

layoutSize: "125%",

itemStyle: {

normal: {

borderColor: options.borderColor,

borderWidth: 1,

areaColor: {

type: 'radial',

x: 0.5,

y: 0.5,

r: 0.8,

colorStops: [{

offset: 0,

color: options.startColor // 0% 處的顏色

}, {

offset: 1,

color: options.endColor // 100% 處的顏色 }], },

shadowColor: options.shadowColor,

shadowOffsetX: -2,

shadowOffsetY: 2,

shadowBlur: 10 },

emphasis: {

areaColor: options.emphasisColor,

borderWidth: 0 } } },

series: series };

this.chart.setOption(option); }

總結

以上是生活随笔為你收集整理的echarts迁徙图 vue_【可视化插件】Vue项目中Echarts流向图迁徙图实现的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。