|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div ref="UpLow" style="width: 100%; height: 500px" /> |
|
|
|
<div ref="UpLow" style="width: 100%; height: 580px" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -37,6 +37,12 @@ const init = () => { |
|
|
|
const dateStr = chgContent.value.map(x => x.dateStr) |
|
|
|
const upCount = chgFlag ? chgContent.value.map(x => x.upCount) : chgContent.value.map(x => x.limitUpCount) |
|
|
|
const lowCount = chgFlag ? chgContent.value.map(x => x.lowCount) : chgContent.value.map(x => x.limitLowCount) |
|
|
|
|
|
|
|
let maxVal:number = chgFlag ? 5200 : 0 |
|
|
|
if (!chgFlag) { |
|
|
|
maxVal = chgContent.value.map(x => x.limitUpCount + x.limitLowCount).sort((a, b) => b - a).at(0) |
|
|
|
} |
|
|
|
|
|
|
|
const myChart = echarts.init(UpLow.value) |
|
|
|
// 指定图表的配置项和数据 |
|
|
|
const option = { |
|
|
@ -96,22 +102,19 @@ const init = () => { |
|
|
|
{ |
|
|
|
type: 'value', |
|
|
|
min: 0, |
|
|
|
max: chgFlag |
|
|
|
? 5200 |
|
|
|
: (value) => { |
|
|
|
return parseInt(value.max + 20) |
|
|
|
} |
|
|
|
max: maxVal |
|
|
|
}, |
|
|
|
{ |
|
|
|
nameLocation: 'start', |
|
|
|
alignTicks: true, |
|
|
|
type: 'value', |
|
|
|
inverse: true |
|
|
|
inverse: true, |
|
|
|
min: 0, |
|
|
|
max: maxVal |
|
|
|
} |
|
|
|
], |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
name: chgFlag ? '涨停家数' : '跌停家数', |
|
|
|
name: chgFlag ? '上涨家数' : '涨停家数', |
|
|
|
type: 'line', |
|
|
|
smooth: true, |
|
|
|
areaStyle: { |
|
|
@ -128,7 +131,7 @@ const init = () => { |
|
|
|
data: upCount |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: chgFlag ? '跌停家数' : '下跌家数', |
|
|
|
name: chgFlag ? '下跌家数' : '跌停家数', |
|
|
|
type: 'line', |
|
|
|
smooth: true, |
|
|
|
yAxisIndex: 1, |
|
|
|