湖里大屏:完成 jChart/line/JLineChart.vue 组件封装
This commit is contained in:
parent
c4f23f2e1a
commit
d158d8ccc6
@ -8,17 +8,15 @@ export default {
|
||||
props: {
|
||||
title: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
text: ''
|
||||
})
|
||||
default: () => ({ text: '' })
|
||||
},
|
||||
grid: {
|
||||
type: Array,
|
||||
default: () => ['15%', '2%', '2%', '2%']
|
||||
default: () => ['12%', '2%', '6%', '1%']
|
||||
},
|
||||
color: {
|
||||
type: Array,
|
||||
default: () => ['#5EC2D0', '#61D2B9', '#F67F51', '#7851F6']
|
||||
default: () => ['#FAC915', '#61D2B9', '#F67F51', '#7851F6']
|
||||
},
|
||||
xData: {
|
||||
required: true,
|
||||
@ -58,56 +56,78 @@ export default {
|
||||
left: grid[3],
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
color,
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: xData,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: [5, 10]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255, 255, 255, .8)'
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: [5, 10],
|
||||
color: '#364252'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: [5, 10],
|
||||
color: '#323D50'
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255, 255, 255, .8)'
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: [5, 10]
|
||||
type: [5, 10],
|
||||
color: '#787E8A'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
type: [5, 10],
|
||||
color: '#364252'
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: yData,
|
||||
type: 'bar',
|
||||
barWidth: 15
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(250,201,21,0.6)'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(250,201,21,0.1)'
|
||||
}
|
||||
])
|
||||
},
|
||||
showSymbol: false,
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
color: '#FAC915',
|
||||
borderColor: '#FAC915',
|
||||
borderWidth: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="problemTrend">
|
||||
<div class="title">{{ title }}</div>
|
||||
<div class="content">
|
||||
<JLineChart :xData="xData" :yData="yData" :title="{ text: '频发问题类别排名前十' }" />
|
||||
<JLineChart :xData="xData" :yData="yData" :title="{ text: '最近30天质量问题趋势分析' }" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user