refactor(selection): update component descriptions and improve layout for stock detail panel

This commit is contained in:
yuxuanhui
2026-09-02 18:26:57 +08:00
parent f41ad0915e
commit 629f933cf9
9 changed files with 149 additions and 150 deletions
@@ -11,6 +11,8 @@ import {
import * as echarts from "echarts/core"
import { CanvasRenderer } from "echarts/renderers"
import { cn } from "@/shared/ui/utils"
import type { SelectionChart as SelectionChartData } from "../api/selection.types"
import { buildSelectionChartOption } from "./selection-chart-option"
@@ -29,9 +31,10 @@ echarts.use([
interface SelectionChartProps {
chart: SelectionChartData
className?: string
}
export function SelectionChart({ chart }: SelectionChartProps) {
export function SelectionChart({ chart, className }: SelectionChartProps) {
const containerRef = useRef<HTMLDivElement>(null)
const instanceRef = useRef<echarts.EChartsType | null>(null)
@@ -62,7 +65,7 @@ export function SelectionChart({ chart }: SelectionChartProps) {
return (
<div
aria-label={`${chart.name} 日线、知行黄白线、成交量和 KDJ 图表`}
className="h-[620px] min-h-[520px] w-full"
className={cn("h-full min-h-70 w-full", className)}
ref={containerRef}
role="img"
/>