Browse Source

样式优化

master
nelson 2 years ago
parent
commit
ac9e93ff3e
  1. 25
      src/components/charts/ContinuousLine.vue
  2. 3
      src/components/charts/UpLow.vue
  3. 17
      src/components/charts/UpLowLine.vue

25
src/components/charts/ContinuousLine.vue

@ -35,13 +35,13 @@ const init = () => {
const dateStr = chgContent.value.map(x => x.dateStr) const dateStr = chgContent.value.map(x => x.dateStr)
// //
const brokenSlabCount = chgContent.value.map(x => x.brokenSlabCount) const brokenSlabCount = chgContent.value.map(x => x.brokenSlabCount)
//
const firstLimitUpCount = chgContent.value.map(x => x.firstLimitUpCount)
// //
const secondLimitUpCount = chgContent.value.map(x => x.secondLimitUpCount) const secondLimitUpCount = chgContent.value.map(x => x.secondLimitUpCount)
// //
const thirdLimitUpCount = chgContent.value.map(x => x.thirdLimitUpCount) const thirdLimitUpCount = chgContent.value.map(x => x.thirdLimitUpCount)
const myChart = echarts.init(ContinuousLine.value) const myChart = echarts.init(ContinuousLine.value)
//
const continuous = chgContent.value.map(x => x.continuous)
// //
const option = { const option = {
title: { title: {
@ -71,8 +71,9 @@ const init = () => {
} }
}, },
legend: { legend: {
data: ['最高空间板', '炸板数量', '首板数量', '二板数量', '三板数量'], data: ['最高空间板', '炸板数量', '二板数量', '三板数量', '连板总数'],
left: 10 left: 'center',
top: '30px'
}, },
dataZoom: [ dataZoom: [
{ {
@ -91,7 +92,6 @@ const init = () => {
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
boundaryGap: false,
data: dateStr data: dateStr
} }
], ],
@ -111,34 +111,37 @@ const init = () => {
data: brokenSlabCount data: brokenSlabCount
}, },
{ {
name: '板数量', name: '板数量',
type: 'line', type: 'line',
smooth: true, smooth: true,
// yAxisIndex: 1, // yAxisIndex: 1,
lineStyle: { lineStyle: {
width: 1 width: 1
}, },
data: firstLimitUpCount data: secondLimitUpCount
}, },
{ {
name: '板数量', name: '板数量',
type: 'line', type: 'line',
smooth: true, smooth: true,
// yAxisIndex: 1, // yAxisIndex: 1,
lineStyle: { lineStyle: {
width: 1 width: 1
}, },
data: secondLimitUpCount data: thirdLimitUpCount
}, },
{ {
name: '三板数量', name: '连板总数',
type: 'line', type: 'line',
smooth: true, smooth: true,
// yAxisIndex: 1, // yAxisIndex: 1,
lineStyle: { lineStyle: {
width: 1 width: 1
}, },
data: thirdLimitUpCount emphasis: {
focus: 'series'
},
data: continuous
} }
] ]
} }

3
src/components/charts/UpLow.vue

@ -74,7 +74,8 @@ const init = () => {
}, },
legend: { legend: {
data: ['上涨家数', '下跌家数'], data: ['上涨家数', '下跌家数'],
left: 10 left: 'center',
top: '30px'
}, },
dataZoom: [ dataZoom: [
{ {

17
src/components/charts/UpLowLine.vue

@ -33,6 +33,8 @@ watch(chgContent, (newValue) => {
const init = () => { const init = () => {
const dateStr = chgContent.value.map(x => x.dateStr) const dateStr = chgContent.value.map(x => x.dateStr)
//
const firstLimitUpCount = chgContent.value.map(x => x.firstLimitUpCount)
// //
const maxLimitUpDay = chgContent.value.map(x => x.maxLimitUpDay) const maxLimitUpDay = chgContent.value.map(x => x.maxLimitUpDay)
// //
@ -69,8 +71,9 @@ const init = () => {
} }
}, },
legend: { legend: {
data: ['最高空间板', '炸板数量', '连板总数'], data: ['最高空间板', '炸板数量', '连板总数', '首板数量'],
left: 10 left: 'center',
top: '30px'
}, },
dataZoom: [ dataZoom: [
{ {
@ -137,6 +140,16 @@ const init = () => {
focus: 'series' focus: 'series'
}, },
data: continuous data: continuous
},
{
name: '首板数量',
type: 'line',
smooth: true,
// yAxisIndex: 1,
lineStyle: {
width: 1
},
data: firstLimitUpCount
} }
] ]
} }

Loading…
Cancel
Save