Browse Source

小财神两侧样式统一;修改情绪探底雷达等图表样式;新工作流;

wangyi/feature-20250804103736-新需求
宋杰 2 weeks ago
parent
commit
23d2f63dab
  1. 4
      src/api/AiEmotionApi.js
  2. 692
      src/views/AiEmotion.vue
  3. 418
      src/views/components/emoEnergyConverter.vue
  4. 18
      src/views/components/emotionDecod.vue
  5. 70
      src/views/components/emotionalBottomRadar.vue
  6. 44
      src/views/components/marketTemperature.vue

4
src/api/AiEmotionApi.js

@ -15,7 +15,7 @@ export const getReplyAPI = function (params) {
headers: {
"Content-Type": "application/json",
Authorization:
"Bearer pat_cOhJRgrEpjXwJJLW1N3YNjCxy19HYTpMFY6XlNCLi4ogm5tdfV266gWIB7MeaRIU",
"Bearer pat_D6vYu7FNXfkSJn8GpmA9oC4DY8LkcbhzrSZuJwuTHT0aYn2uqZ6P5cBfRD0kwZYR",
},
});
};
@ -31,7 +31,7 @@ export const getConclusionAPI = function (params) {
headers: {
"Content-Type": "application/json",
Authorization:
"Bearer pat_cOhJRgrEpjXwJJLW1N3YNjCxy19HYTpMFY6XlNCLi4ogm5tdfV266gWIB7MeaRIU",
"Bearer pat_D6vYu7FNXfkSJn8GpmA9oC4DY8LkcbhzrSZuJwuTHT0aYn2uqZ6P5cBfRD0kwZYR",
},
});
};

692
src/views/AiEmotion.vue
File diff suppressed because it is too large
View File

418
src/views/components/emoEnergyConverter.vue

@ -109,40 +109,50 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
min: qxnlzhqData.dd,
max: qxnlzhqData.zc,
name: "【情绪冰点区】",
color: "#FF9F9F",
fontColor: '#2D2D89',
color: "#F5D6FF",
fontColor: '#A7691C',
NumberColor: 'white',
},
{
min: qxnlzhqData.zc,
max: qxnlzhqData.ht,
name: "【认知潜伏区】",
color: "#FFCB75",
fontColor: '#2D2D89',
color: "#FFF6C4",
fontColor: '#A7691C',
NumberColor: 'white',
},
{
min: qxnlzhqData.ht,
max: qxnlzhqData.qs,
name: "【多空消化区】",
color: "#D7E95D",
fontColor: '#2D2D89',
color: {
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [
{ offset: 0, color: '#D7FF9B' },
{ offset: 1, color: '#CEFF85' }
]
},
fontColor: '#A7691C',
NumberColor: 'white',
},
{
min: qxnlzhqData.qs,
max: qxnlzhqData.tp,
name: "【共识加速区】",
color: "#A0F56F",
fontColor: '#2D2D89',
color: "#FFDC8F",
fontColor: '#A7691C',
NumberColor: 'white',
},
{
min: qxnlzhqData.tp,
max: qxnlzhqData.js,
name: "【情绪临界区】",
color: "#87F3CD",
fontColor: '#2D2D89',
color: "#FFC0AA",
fontColor: 'white',
NumberColor: 'white',
},
];
@ -176,9 +186,43 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
const priceValues = kline.flatMap(item => [item[1], item[2], item[3], item[4]]);
const dataMin = Math.min(...priceValues);
const dataMax = Math.max(...priceValues);
//
let maxHighPrice = -Infinity;
let maxHighPriceIndex = -1;
kline.forEach((item, index) => {
const highPrice = item[4]; // 54
if (highPrice > maxHighPrice) {
maxHighPrice = highPrice;
maxHighPriceIndex = index;
}
});
//
const stopProfitPrice = Number(qxnlzhqData.cc) * 1.05; //
const stopLossPrice = Number(qxnlzhqData.cc) * 0.97; //
// K线
const lastClosePrice = mixData[mixData.length - 1].value[2];
// 线
const priceBuffer = (dataMax - dataMin) * 0.02; // 2%
//
let maxPricePosition = 'top';
let maxPriceOffset = [0, -5];
if (Math.abs(maxHighPrice - stopProfitPrice) < priceBuffer) {
maxPriceOffset = [0, -25]; //
}
//
let closePricePosition = 'bottom';
let closePriceOffset = [0, 15];
if (Math.abs(lastClosePrice - stopLossPrice) < priceBuffer) {
closePriceOffset = [0, 25]; //
}
if (Math.abs(lastClosePrice - stopProfitPrice) < priceBuffer) {
closePriceOffset = [0, 25]; //
}
//
const startIndex = Math.max(0, mixData.length - 17);
//
@ -274,10 +318,10 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
const chartHeight = size.viewSize[1];
const tooltipWidth = size.contentSize[0];
const tooltipHeight = size.contentSize[1];
//
const isMobile = window.innerWidth <= 768;
if (isMobile) {
//
return {
@ -288,17 +332,17 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
//
let x = point[0];
let y = point[1];
// tooltip
if (x + tooltipWidth > chartWidth) {
x = chartWidth - tooltipWidth - 10;
}
// tooltip
if (y + tooltipHeight > chartHeight) {
y = chartHeight - tooltipHeight - 10;
}
return [Math.max(10, x), Math.max(10, y)];
}
},
@ -316,16 +360,16 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
borderWidth: 1
}
},
backgroundColor: '#646E71',
backgroundColor: '#E8E8F2',
borderColor: '#fff',
borderWidth: 1,
padding: [8, 12],
textStyle: {
color: '#fff',
color: '#000',
fontSize: window.innerWidth <= 768 ? 10 : 12 // 使
},
extraCssText: window.innerWidth <= 768 ?
'max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);' :
extraCssText: window.innerWidth <= 768 ?
'max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);' :
'max-width: 350px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);',
formatter: function (params) {
if (!params || params.length === 0) return ''
@ -335,7 +379,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
const lineHeight = isMobile ? '1.3' : '1.5';
const marginBottom = isMobile ? '4px' : '6px';
let result = `<div style="font-weight: bold; color: #fff; margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">${params[0].name}</div>`
let result = `<div style="font-weight: bold; color: #000; margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">${params[0].name}</div>`
params.forEach(param => {
let value = param.value
@ -353,33 +397,48 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
return ''
}
let priceChange = closePrice - openPrice
let changePercent = ((priceChange / openPrice) * 100).toFixed(2)
let changeColor = priceChange >= 0 ? '#14b143' : '#ef232a'
//
let previousClosePrice = null;
const currentIndex = param.dataIndex;
if (currentIndex > 0 && mixData[currentIndex - 1]) {
previousClosePrice = mixData[currentIndex - 1].value[2]; //
}
let priceChange, changePercent;
if (previousClosePrice !== null && typeof previousClosePrice === 'number') {
// 使
priceChange = closePrice - previousClosePrice;
changePercent = ((priceChange / previousClosePrice) * 100).toFixed(2);
} else {
// 使
priceChange = closePrice - openPrice;
changePercent = ((priceChange / openPrice) * 100).toFixed(2);
}
let changeColor = priceChange >= 0 ? '#32B520' : '#D8001B'
if (isMobile) {
//
result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>开盘价:</span><span>${openPrice.toFixed(2)}</span></div>`
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>收盘价:</span><span>${closePrice.toFixed(2)}</span></div>`
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>最低价:</span><span>${lowPrice.toFixed(2)}</span></div>`
result += `<div style="color: #fff; display: flex; justify-content: space-between;"><span>最高价:</span><span>${highPrice.toFixed(2)}</span></div>`
result += `<div style="color: #000; display: flex; justify-content: space-between;"><span>开盘价:</span><span>${openPrice.toFixed(2)}</span></div>`
result += `<div style="color: #000; display: flex; justify-content: space-between;"><span>收盘价:</span><span>${closePrice.toFixed(2)}</span></div>`
result += `<div style="color: #000; display: flex; justify-content: space-between;"><span>最低价:</span><span>${lowPrice.toFixed(2)}</span></div>`
result += `<div style="color: #000; display: flex; justify-content: space-between;"><span>最高价:</span><span>${highPrice.toFixed(2)}</span></div>`
result += `<div style="color: ${changeColor}; display: flex; justify-content: space-between;"><span>涨跌:</span><span>${priceChange >= 0 ? '+' : ''}${priceChange.toFixed(2)} (${changePercent}%)</span></div>`
result += `</div>`
} else {
//
result += `<div style="margin-bottom: ${marginBottom}; font-size: ${fontSize}; line-height: ${lineHeight};">`
result += `<div style="color: #fff;">开盘价: ${openPrice.toFixed(2)}</div>`
result += `<div style="color: #fff;">收盘价: ${closePrice.toFixed(2)}</div>`
result += `<div style="color: #fff;">最低价: ${lowPrice.toFixed(2)}</div>`
result += `<div style="color: #fff;">最高价: ${highPrice.toFixed(2)}</div>`
result += `<div style="color: #000;">开盘价: ${openPrice.toFixed(2)}</div>`
result += `<div style="color: #000;">收盘价: ${closePrice.toFixed(2)}</div>`
result += `<div style="color: #000;">最低价: ${lowPrice.toFixed(2)}</div>`
result += `<div style="color: #000;">最高价: ${highPrice.toFixed(2)}</div>`
result += `<div style="color: ${changeColor};">涨跌: ${priceChange >= 0 ? '+' : ''}${priceChange.toFixed(2)} (${changePercent}%)</div>`
result += `</div>`
}
} else if (param.seriesName === '止盈线' && value !== null && value !== undefined && typeof value === 'number') {
result += `<div style="color: #FF0000; margin-bottom: 2px; font-size: ${fontSize}; line-height: ${lineHeight};">${isMobile ? '止盈' : param.seriesName}: ${value.toFixed(2)}</div>`
result += `<div style="color: #FC0000; margin-bottom: 2px; font-size: ${fontSize}; line-height: ${lineHeight};">${isMobile ? '止盈' : param.seriesName}: ${value.toFixed(2)}</div>`
} else if (param.seriesName === '止损线' && value !== null && value !== undefined && typeof value === 'number') {
result += `<div style="color: #001EFF; margin-bottom: 2px; font-size: ${fontSize}; line-height: ${lineHeight};">${isMobile ? '止损' : param.seriesName}: ${value.toFixed(2)}</div>`
result += `<div style="color: #002DFF; margin-bottom: 2px; font-size: ${fontSize}; line-height: ${lineHeight};">${isMobile ? '止损' : param.seriesName}: ${value.toFixed(2)}</div>`
}
})
@ -417,7 +476,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
],
xAxis: {
type: "category",
data: mixData.map((item) => item.date),
data: [...mixData.map((item) => item.date), '', '', ''], // K线
axisLabel: {
rotate: 0, //
color: "white",
@ -429,6 +488,15 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
color: 'white', // x线
}
},
axisTick: {
show: true,
alignWithLabel: true, // 线
lineStyle: {
color: "white", // 线
width: 1,
type: "dashed" // 线
}
},
},
yAxis: {
scale: true,
@ -469,17 +537,73 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
markPoint: {
symbol: 'circle',
symbolSize: 10,
data: markPointData,
data: [
...markPointData,
//
{
name: '最高价',
coord: [maxHighPriceIndex, maxHighPrice],
itemStyle: {
normal: {
color: 'transparent', //
borderColor: 'transparent',
borderWidth: 0
}
},
label: {
normal: {
show: true,
position: maxPricePosition,
formatter: `${maxHighPrice.toFixed(2)}`,
textStyle: {
color: 'rgb(0,170,255)',
fontSize: 12,
fontWeight: 'bold',
// textBorderColor: '#000000',
textBorderWidth: 1
},
offset: maxPriceOffset
}
}
},
// K线
{
name: '收盘价',
coord: [mixData.length - 1, mixData[mixData.length - 1].value[2]],
itemStyle: {
normal: {
color: 'transparent', //
borderColor: 'transparent',
borderWidth: 0
}
},
label: {
normal: {
show: true,
position: closePricePosition,
formatter: `${lastClosePrice.toFixed(2)}`,
textStyle: {
color: 'rgb(59,143,8)',
fontSize: 12,
fontWeight: 'bold',
// textBorderColor: '#000000',
textBorderWidth: 1
},
offset: closePriceOffset
}
}
}
],
z: 5 //
},
itemStyle: {
normal: {
// 线 >
// color: '#14b143', // < 绿
color: 'rgba(0,0,0,0)',
color0: '#ef232a', // >
borderColor: '#14b143', // 线绿
borderColor0: '#ef232a', // 线
color: '#00AAFF',
color0: '#FF007F', // >
borderColor: '#00AAFF', // 线绿
borderColor0: '#FF007F', // 线
borderWidth: 1.5
}
},
@ -536,7 +660,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
type: 'solid'
}
},
z: 1,
z: 10,
silent: true,
showInLegend: false
},
@ -552,31 +676,29 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
type: 'solid'
}
},
z: 2,
z: 10,
markPoint: {
symbol: 'circle',
symbolSize: 1,
data: [
{
coord: [mixData.map((item) => item.value).length - 1, stopProfitPrice],
coord: [startIndex, stopProfitPrice],
itemStyle: {
color: '#ff80ff'
color: 'transparent'
},
label: {
normal: {
show: true,
position: 'top',
formatter: `{text|止盈}`,
rich: {
text: {
color: '#FF0000',
fontSize: 14,
fontWeight: 'bold',
textBorderColor: '#ffffff',
textBorderWidth: 2
}
position: 'left',
formatter: `止盈${stopProfitPrice.toFixed(2)}`,
textStyle: {
color: '#FF0000',
fontSize: 12,
fontWeight: 'bold',
textBorderColor: '#ffffff',
textBorderWidth: 2
},
offset: [-20, 0]
offset: [-10, 0]
}
}
}
@ -595,7 +717,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
type: 'solid'
}
},
z: 1,
z: 10,
silent: true,
showInLegend: false
},
@ -611,117 +733,115 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
type: 'solid'
}
},
z: 2,
markPoint: {
symbol: 'circle',
symbolSize: 1,
data: [
{
coord: [mixData.map((item) => item.value).length - 1, stopLossPrice],
itemStyle: {
color: '#080bfd'
},
label: {
normal: {
show: true,
position: 'bottom',
formatter: `{text|止损}`,
rich: {
text: {
color: '#001EFF',
fontSize: 14,
fontWeight: 'bold',
textBorderColor: '#ffffff',
textBorderWidth: 2
}
},
offset: [-20, 0]
}
}
}
]
}
},
{
name: '最低价',
type: 'line',
symbol: 'none',
lineStyle: {
normal: {
color: 'transparent',
width: 0
}
},
z: 10,
markPoint: {
symbol: 'circle',
symbolSize: 1,
data: [
{
coord: [mixData.length - 1, mixData[mixData.length - 1].value[2]],
coord: [startIndex, stopLossPrice],
itemStyle: {
color: 'transparent'
},
label: {
normal: {
show: true,
position: 'bottom',
formatter: `{text| ${mixData[mixData.length - 1].value[2].toFixed(2)}}`,
rich: {
text: {
color: '#001EFF',
fontSize: 12,
fontWeight: 'bold',
textBorderColor: '#ffffff',
textBorderWidth: 2,
}
position: 'left',
formatter: `止损${stopLossPrice.toFixed(2)}`,
textStyle: {
color: '#001EFF',
fontSize: 12,
fontWeight: 'bold',
textBorderColor: '#ffffff',
textBorderWidth: 2
},
offset: [-25, -40]
offset: [-10, 0]
}
}
}
]
}
},
{
name: '最高价',
type: 'line',
symbol: 'none',
lineStyle: {
normal: {
color: 'transparent',
width: 0
}
},
markPoint: {
symbol: 'circle',
symbolSize: 1,
data: [
{
coord: [mixData.length - 1, mixData[mixData.length - 1].value[3]],
itemStyle: {
color: 'transparent'
},
label: {
normal: {
show: true,
position: 'top',
formatter: `{text| ${mixData[mixData.length - 1].value[3].toFixed(2)}}`,
rich: {
text: {
color: '#FF0000',
fontSize: 12,
fontWeight: 'bold',
textBorderColor: '#ffffff',
textBorderWidth: 2,
}
},
offset: [-25, 40]
}
}
}
]
}
}
// {
// name: '',
// type: 'line',
// symbol: 'none',
// lineStyle: {
// normal: {
// color: 'transparent',
// width: 0
// }
// },
// markPoint: {
// symbol: 'circle',
// symbolSize: 1,
// data: [
// {
// coord: [mixData.length - 1, mixData[mixData.length - 1].value[2]],
// itemStyle: {
// color: 'transparent'
// },
// label: {
// normal: {
// show: true,
// position: 'bottom',
// formatter: `{text| ${mixData[mixData.length - 1].value[2].toFixed(2)}}`,
// rich: {
// text: {
// color: '#001EFF',
// fontSize: 12,
// fontWeight: 'bold',
// textBorderColor: '#ffffff',
// textBorderWidth: 2,
// }
// },
// offset: [-25, -40]
// }
// }
// }
// ]
// }
// },
// {
// name: '',
// type: 'line',
// symbol: 'none',
// lineStyle: {
// normal: {
// color: 'transparent',
// width: 0
// }
// },
// markPoint: {
// symbol: 'circle',
// symbolSize: 1,
// data: [
// {
// coord: [mixData.length - 1, mixData[mixData.length - 1].value[3]],
// itemStyle: {
// color: 'transparent'
// },
// label: {
// normal: {
// show: true,
// position: 'top',
// formatter: `{text| ${mixData[mixData.length - 1].value[3].toFixed(2)}}`,
// rich: {
// text: {
// color: '#FF0000',
// fontSize: 12,
// fontWeight: 'bold',
// textBorderColor: '#ffffff',
// textBorderWidth: 2,
// }
// },
// offset: [-25, 40]
// }
// }
// }
// ]
// }
// }
],
grid: {
left: "13%",
@ -814,7 +934,7 @@ onBeforeUnmount(() => {
<style scoped>
#qxnlzhqEcharts {
width: 100%;
height: 700px;
height: 542px;
margin: 0;
box-sizing: border-box;
overflow: hidden;

18
src/views/components/emotionDecod.vue

@ -89,7 +89,10 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
//
grid: [
{ top: "5%", height: "40%" },
{
top: "5%",
height: window.innerWidth <= 768 ? "30%" : "40%"
},
{ top: "45%", height: "35%" },
{ top: "80%", height: "2%" },
],
@ -161,6 +164,15 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
},
type: "line",
},
axisTick: {
show: true,
alignWithLabel: true, // 线
lineStyle: {
color: "white", // 线
width: 1,
type: "dashed" // 线
}
},
},
],
yAxis: [
@ -266,7 +278,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
shadowOffsetX: 2,
shadowOffsetY: 2,
},
bottom: window.innerWidth > 768 ? "10%" : "5%", //
bottom: window.innerWidth > 768 ? "8%" : "5%", //
},
{
show: !1,
@ -471,7 +483,7 @@ onBeforeUnmount(() => {
#qxjmqEcharts {
width: 100%;
height: 800px;
height: 542px;
margin: 0;
/* top: 5rem; */
box-sizing: border-box;

70
src/views/components/emotionalBottomRadar.vue

@ -137,14 +137,14 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
axisPointer: {
type: 'cross',
crossStyle: {
color: '#fff',
color: 'grey',
width: 1,
type: 'solid'
type: 'dashed'
},
lineStyle: {
color: '#fff',
color: 'grey',
width: 1,
type: 'solid'
type: 'dashed'
},
label: {
backgroundColor: 'rgba(0, 0, 0, 0.8)',
@ -154,14 +154,15 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
}
},
// backgroundColor: 'rgba(0, 0, 0, 0.8)',
backgroundColor: '#646E71',
borderColor: '#fff',
borderWidth: 1,
padding: 10,
textStyle: {
color: '#fff',
fontSize: 12
},
backgroundColor: 'rgba(232, 232, 242, 0.87)',
borderColor: '#fff',
borderWidth: 1,
borderRadius: 8,
padding: 10,
textStyle: {
color: '#fff',
fontSize: 12
},
formatter: function (params) {
if (!params || params.length === 0) return ''
@ -203,9 +204,16 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
return ''
}
let priceChange = closePrice - openPrice
let changePercent = ((priceChange / openPrice) * 100).toFixed(2)
let changeColor = priceChange >= 0 ? '#14b143' : '#ef232a' // 绿
//
let previousClosePrice = null;
const currentIndex = param.dataIndex;
if (currentIndex > 0 && kLineDataArray && kLineDataArray[currentIndex - 1]) {
// K线
const previousData = kLineDataArray[currentIndex - 1];
if (previousData && Array.isArray(previousData) && previousData.length >= 2) {
previousClosePrice = previousData[1]; // ECharts[, , , ]
}
}
result += `<div style="margin-bottom: 6px;">`
result += `<div style="color: #fff; font-weight: bold;">${param.seriesName}</div>`
@ -213,7 +221,15 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
result += `<div style="color: #fff;">收盘价: ${closePrice.toFixed(1)}</div>`
result += `<div style="color: #fff;">最低价: ${lowPrice.toFixed(1)}</div>`
result += `<div style="color: #fff;">最高价: ${highPrice.toFixed(1)}</div>`
result += `<div style="color: ${changeColor};">涨跌: ${priceChange >= 0 ? '+' : ''}${priceChange.toFixed(2)} (${changePercent}%)</div>`
//
if (previousClosePrice !== null && typeof previousClosePrice === 'number') {
let priceChange = closePrice - previousClosePrice;
let changePercent = ((priceChange / previousClosePrice) * 100).toFixed(2);
let changeColor = priceChange >= 0 ? '#14b143' : '#ef232a'; // 绿
result += `<div style="color: ${changeColor};">涨跌: ${priceChange >= 0 ? '+' : ''}${priceChange.toFixed(2)} (${changePercent}%)</div>`;
}
result += `</div>`
} else if (param.seriesName === '红线') {
result += `<div style="color: #ef232a; margin-bottom: 4px;">${param.seriesName}: ${value}</div>`
@ -239,16 +255,16 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
right: '3%',
top: '20px',
bottom: '50%',
height: '300px',
height: '150px',
width: '85%'
// containLabel: true
},
{
left: '10%',
right: '3%',
top: '320px',
top: '170px',
bottom: '25%',
height: '300px',
height: '150px',
width: '85%'
// containLabel: true
@ -256,9 +272,9 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
{
left: '10%',
right: '3%',
top: '620px',
top: '320px',
bottom: '50px',
height: '300px',
height: '150px',
width: '85%'
// containLabel: true
@ -277,7 +293,13 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
}
},
axisTick: {
show: false
show: true,
alignWithLabel: true, // 线
lineStyle: {
color: "#999", // 线
width: 1,
type: "dashed" // 线
}
},
axisLabel: {
show: false
@ -462,7 +484,7 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) {
start: 0,
end: 100,
show: true,
bottom: window.innerWidth > 768 ? 80 : 50,
bottom: window.innerWidth > 768 ? 30 : 50,
height: 20,
borderColor: '#CFD6E3',
fillerColor: 'rgba(135, 175, 274, 0.2)',
@ -699,7 +721,7 @@ onBeforeUnmount(() => {
<style>
#bottomRadarChart {
width: 100%;
height: 1040px;
height: 542px;
box-sizing: border-box;
overflow: hidden;
margin: 0px auto !important;

44
src/views/components/marketTemperature.vue

@ -490,14 +490,16 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
},
legend: {
data: ["K线", "股票温度", "市场温度"],
textStyle: { color: "white", fontSize: 18 },
textStyle: { color: "white", fontSize: window.innerWidth <= 768 ? 14 : 18 },
},
grid: {
left: window.innerWidth <= 768 ? '40px' : '100px', // 使
left: window.innerWidth <= 768 ? '50px' : '100px', // 使
right: window.innerWidth <= 768 ? '40px' : '100px', // y
top: window.innerWidth <= 768 ? '40px' : '60px',
bottom: window.innerWidth <= 768 ? '60px' : '80px', // dataZoom
containLabel: false // 使
containLabel: false, // 使
height: window.innerWidth <= 768 ? '200px' : '300px',
width: window.innerWidth <= 768 ? '70%' : '80%',
},
xAxis: {
type: "category",
@ -509,7 +511,15 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
fontWeight: "bold",
},
axisTick: { lineStyle: { color: "#00BFFF" } },
axisTick: {
show: true,
alignWithLabel: true, // 线
lineStyle: {
color: "white", // 线
width: 1,
type: "dashed" // 线
}
},
axisPointer: {
show: true,
type: "line",
@ -523,6 +533,15 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
color: "black",
},
},
splitLine: {
show: false, // 线
lineStyle: {
color: "#999",
width: 1,
type: "dashed",
opacity: 0.3 // 使线
}
},
},
yAxis: [
{
@ -790,7 +809,7 @@ defineExpose({ initChart });
.KlineClass {
width: 100%;
height: 600px;
height: 420px;
}
.market-temperature {
@ -810,23 +829,23 @@ defineExpose({ initChart });
}
.border3 {
margin-top: 40px;
/* margin-top: 40px; */
border-radius: 8px;
padding: 20px;
/* margin-left: 0; */
width: 100%;
height: 100%;
height: auto;
box-sizing: border-box;
overflow: hidden;
}
.border4 {
margin-top: 40px;
/* margin-top: 40px; */
border-radius: 8px;
padding: 20px;
width: 80%;
/* margin-left: 8%; */
height: 48vw;
height: 35vw;
overflow: visible;
}
@ -861,7 +880,7 @@ defineExpose({ initChart });
margin-top: 0px;
border-radius: 8px;
padding: 0px;
width: 100%;
width: 80%;
margin-left: 0%;
height: 80vw;
overflow: visible;
@ -1048,6 +1067,9 @@ defineExpose({ initChart });
display: flex;
justify-content: center;
align-items: center;
@media only screen and (max-width: 768px) {
font-size: 12px;
}
}
.calendar {
@ -1101,7 +1123,7 @@ defineExpose({ initChart });
}
.monthContent {
margin-top: 1.2vw;
margin-top: 0.5vw;
font-weight: bold;
font-size: 1.2vw;
}

Loading…
Cancel
Save