This commit is contained in:
weipengfei 2023-12-18 17:56:31 +08:00
parent 190475cd25
commit c7c7fb0af8
1 changed files with 48 additions and 8 deletions

View File

@ -47,16 +47,33 @@ const initMap = () => {
let color = ['#00A8FF', '#4B5FDB', '#00FFCB', '#5BDBF6'];
let data1 = [
{ value: 400, name: '养殖种类: 本地鸡' },
{ value: 435, name: '养殖种类: 本地鸭' },
{ value: 580, name: '养殖种类: 本地鹅' },
{ value: 884, name: '养殖种类: 本地猪' },
{ value: 400, name: '本地鸡' },
{ value: 435, name: '本地鸭' },
{ value: 580, name: '本地鹅' },
{ value: 884, name: '本地猪' },
]
let option1 = {
tooltip: {
trigger: 'item',
},
color: color,
tooltip: {
trigger: "item",
backgroundColor: 'rgba(0, 156, 255, 0.6)', //
textStyle: {
color: '#fff'
},
borderColor: "rgba(0, 156, 255, 1)",
axisPointer: {
type: 'shadow',
shadowStyle: {
color: 'rgba(255,255,255, .2)',
}
},
formatter: function (params) {
return params.data.name + ': ' + params.data.value;
}
},
legend: {
show: true,
// icon: "rect",
@ -69,6 +86,9 @@ const initMap = () => {
textStyle: {
color: "#fff"
},
formatter: function (params) {
return '种类: ' + params;
}
},
series: [
{
@ -96,16 +116,33 @@ const initMap = () => {
};
let data2 = [
{ value: 500, name: '养殖种类: 本地鸡' },
{ value: 735, name: '养殖种类: 本地鸭' },
{ value: 580, name: '养殖种类: 本地鹅' },
{ value: 484, name: '养殖种类: 本地猪' },
{ value: 500, name: '本地鸡' },
{ value: 735, name: '本地鸭' },
{ value: 580, name: '本地鹅' },
{ value: 484, name: '本地猪' },
]
let option2 = {
tooltip: {
trigger: 'item',
},
color: color,
tooltip: {
trigger: "item",
backgroundColor: 'rgba(0, 156, 255, 0.6)', //
textStyle: {
color: '#fff'
},
borderColor: "rgba(0, 156, 255, 1)",
axisPointer: {
type: 'shadow',
shadowStyle: {
color: 'rgba(255,255,255, .2)',
}
},
formatter: function (params) {
return params.data.name + ': ' + params.data.value;
}
},
legend: {
show: true,
// icon: "rect",
@ -118,6 +155,9 @@ const initMap = () => {
textStyle: {
color: "#fff"
},
formatter: function (params) {
return '种类: ' + params;
}
},
series: [
{