图表组件

This commit is contained in:
yanran200730
2023-03-09 18:01:14 +08:00
parent b30ce1c9a2
commit cef67555bf
4 changed files with 314 additions and 42 deletions

View File

@@ -1,15 +1,9 @@
export default {
legend: {
right: 0,
itemHeight: 5,
itemWidth: 16,
textStyle: { color: '#fff' }
},
yAxis: {
nameGap: 23,
minInterval: 1,
splitLine: { lineStyle: { color: 'rgba(255,255,255,.2)', type: 'dashed' } },
axisLabel: { color: '#fff' },
axisLabel: { color: '#C3C4C4' },
axisPointer: { show: false }
},
axisPointer: {
@@ -25,8 +19,8 @@ export default {
y: 0,
y2: 1,
colorStops: [
{ offset: 0, color: 'rgba(66, 187, 255, 1)' },
{ offset: 1, color: 'rgba(37, 143, 255, 0.2)' }
{ offset: 0, color: 'rgba(0, 249, 255, 1)' },
{ offset: 1, color: 'rgba(0, 249, 255, 0.4)' }
]
},
{
@@ -36,8 +30,8 @@ export default {
y: 0,
y2: 1,
colorStops: [
{ offset: 0, color: 'rgba(66, 255, 254, 1)' },
{ offset: 1, color: 'rgba(37, 255, 246, 0.2)' }
{ offset: 0, color: 'rgba(236, 102, 102, 1)' },
{ offset: 1, color: 'rgba(236, 102, 102, 0.4)' }
]
},
{
@@ -47,8 +41,8 @@ export default {
y: 0,
y2: 1,
colorStops: [
{ offset: 0, color: 'rgba(97, 253, 185, 1)' },
{ offset: 1, color: 'rgba(97, 253, 185, 0.2)' }
{ offset: 0, color: 'rgba(252, 59, 255, 1)' },
{ offset: 1, color: 'rgba(252, 59, 255, 0.4)' }
]
},
{
@@ -58,8 +52,8 @@ export default {
y: 0,
y2: 1,
colorStops: [
{ offset: 0, color: 'rgba(253, 108, 57, 1)' },
{ offset: 1, color: 'rgba(253, 108, 57, 0.2)' }
{ offset: 0, color: 'rgba(24, 144, 255, 1)' },
{ offset: 1, color: 'rgba(24, 144, 255, 0.4)' }
]
},
{
@@ -69,22 +63,14 @@ export default {
y: 0,
y2: 1,
colorStops: [
{ offset: 0, color: 'rgba(248, 187, 25, 1)' },
{ offset: 1, color: 'rgba(55, 39, 5, 1)' }
{ offset: 0, color: 'rgba(149, 255, 68, 1)' },
{ offset: 1, color: 'rgba(149, 255, 68, 0.4)' }
]
}
],
daemon: {
type: 'bar',
label: {
show: true,
position: 'top',
color: '#fff',
formatter: e => {
return e.data[e.seriesName] || ''
}
},
barWidth: 16,
barWidth: 20,
barCategoryGap: 40,
itemStyle: {}
}