fix(selection): update chart labels and improve layout for clarity in selection components
This commit is contained in:
@@ -35,7 +35,7 @@ export type SelectionChartOption = ComposeOption<
|
||||
/**
|
||||
* Build the three-grid financial chart configuration from aligned API points.
|
||||
*
|
||||
* @param points Ascending qfq OHLCV, KDJ, and Zhixing-line points from the API.
|
||||
* @param points Ascending qfq OHLCV, J, and Zhixing-line points from the API.
|
||||
* @returns One ECharts option with synchronized axes and an exact 120-point window.
|
||||
*/
|
||||
export function buildSelectionChartOption(
|
||||
@@ -75,7 +75,7 @@ export function buildSelectionChartOption(
|
||||
top: 8,
|
||||
},
|
||||
{
|
||||
data: ["K", "D", "J"],
|
||||
data: ["J"],
|
||||
right: 20,
|
||||
top: "73%",
|
||||
},
|
||||
@@ -126,25 +126,25 @@ export function buildSelectionChartOption(
|
||||
xAxisIndex: 1,
|
||||
yAxisIndex: 1,
|
||||
},
|
||||
...(["k", "d", "j"] as const).map((key, index): LineSeriesOption => ({
|
||||
{
|
||||
connectNulls: false,
|
||||
data: points.map((point) => point[key]),
|
||||
name: key.toUpperCase(),
|
||||
data: points.map((point) => point.j),
|
||||
lineStyle: {
|
||||
color: "#9333ea",
|
||||
width: 1.5,
|
||||
},
|
||||
name: "J",
|
||||
showSymbol: false,
|
||||
smooth: false,
|
||||
type: "line",
|
||||
xAxisIndex: 2,
|
||||
yAxisIndex: 2,
|
||||
lineStyle: {
|
||||
color: ["#2563eb", "#d97706", "#9333ea"][index],
|
||||
width: 1.5,
|
||||
},
|
||||
})),
|
||||
},
|
||||
],
|
||||
title: [
|
||||
{ left: 12, text: "日线", textStyle: { fontSize: 12 }, top: 8 },
|
||||
{ left: 72, text: "成交量", textStyle: { fontSize: 12 }, top: "54%" },
|
||||
{ left: 72, text: "KDJ", textStyle: { fontSize: 12 }, top: "72%" },
|
||||
{ left: 72, text: "J", textStyle: { fontSize: 12 }, top: "72%" },
|
||||
],
|
||||
tooltip: {
|
||||
axisPointer: { type: "cross" },
|
||||
|
||||
Reference in New Issue
Block a user