import React from "react"; import { ReactNextElement } from "@next-core/react-element"; import "@next-core/theme"; import type { MiniLineChartProps } from "@next-bricks/mini-chart/mini-line-chart"; export interface StatWithMiniChartProps extends Pick { label?: string; value?: string; size?: "medium" | "small"; } /** * 构件 `ai-portal.stat-with-mini-chart` * * 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。 */ export declare class StatWithMiniChart extends ReactNextElement implements StatWithMiniChartProps { /** 统计指标标签名称 */ accessor label: string | undefined; /** 统计数值文本 */ accessor value: string | undefined; /** * 展示尺寸,medium 时图表高度为 92px,small 时为 55px * @default "medium" */ accessor size: "medium" | "small" | undefined; /** * 折线颜色 * @default "var(--color-brand)" */ accessor lineColor: string | undefined; /** 是否在折线下方显示渐变填充区域 */ accessor showArea: boolean | undefined; /** * Specify the minimum value of the y-axis. * If not specified, the minimum value will be calculated from the data. */ accessor min: number | undefined; /** * Specify the maximum value of the y-axis. * If not specified, the maximum value will be calculated from the data. */ accessor max: number | undefined; /** * x 轴字段名(数据中时间字段的 key) * @default "0" */ accessor xField: string | undefined; /** * y 轴字段名(数据中数值字段的 key) * @default "1" */ accessor yField: string | undefined; /** 图表数据源,每项为包含 xField 和 yField 字段的对象 */ accessor data: Record[] | undefined; render(): React.JSX.Element; }