1
0

feat: 增加日线的均线显示

This commit is contained in:
2025-10-15 23:14:50 +08:00
parent 452d1c681d
commit 47f8b30a02
5 changed files with 123 additions and 30 deletions

View File

@@ -563,6 +563,7 @@ const financePropertyLabel = (idField: string, label: string, type: FinanceType,
const candleChart = (title: string, subtitle: string, api: Api): Schema => {
return {
className: 'mt-2',
type: 'chart',
height: 500,
api: api,
@@ -638,30 +639,47 @@ const candleChart = (title: string, subtitle: string, api: Api): Schema => {
show: false,
},
},
yAxis: {
scale: true,
axisLine: {
lineStyle: {
color: '#e0e0e0',
yAxis: [
{
scale: true,
axisLine: {
lineStyle: {
color: '#e0e0e0',
},
},
axisLabel: {
color: '#666',
fontWeight: 'bold',
formatter: function (value: number) {
return value.toFixed(2)
},
},
splitLine: {
lineStyle: {
type: 'dashed',
color: '#f0f0f0',
},
},
axisTick: {
show: false,
},
},
axisLabel: {
color: '#666',
fontWeight: 'bold',
formatter: function (value: number) {
return value.toFixed(2)
{
scale: true,
axisLine: {
show: false
},
},
splitLine: {
lineStyle: {
type: 'dashed',
color: '#f0f0f0',
axisTick: {
show: false
},
axisLabel: {
show: false
},
splitLine: {
show: false
}
},
axisTick: {
show: false,
},
},
],
dataZoom: [
{
type: 'inside',
@@ -680,6 +698,7 @@ const candleChart = (title: string, subtitle: string, api: Api): Schema => {
{
type: 'candlestick',
data: '${yList || []}',
yAxisIndex: 0,
itemStyle: {
color: '#eb5454',
color0: '#4aaa93',
@@ -687,7 +706,36 @@ const candleChart = (title: string, subtitle: string, api: Api): Schema => {
borderColor0: '#4aaa93',
borderWidth: 1,
},
},
{
type: 'line',
yAxisIndex: 0,
data: '${sma10 || []}',
smooth: true,
symbol: 'none',
lineStyle: {
color: 'rgba(25,147,51,0.5)',
},
},
{
type: 'line',
yAxisIndex: 0,
data: '${sma30 || []}',
smooth: true,
symbol: 'none',
lineStyle: {
color: 'rgba(10,94,131,0.5)',
},
},
{
type: 'line',
yAxisIndex: 0,
data: '${sma60 || []}',
smooth: true,
symbol: 'none',
lineStyle: {
color: 'rgba(231,15,130,0.5)',
},
},
],
},