VChart
VChart copied to clipboard
[Feature] add templates of funnel-chart
What problem does this feature solve?
漏斗图有一些常见的样式,可以考虑沉淀到模板中
What does the proposed API look like?
箭头可以考虑沉淀一些常见的布局算法:
export type Arrow = {
/**
* @en Arrow from
* @version 1.0.0
*/
from: number;
/**
* @en Arrow to
* @version 1.0.0
*/
to: number;
/**
* @en Arrow text
* @version 1.0.0
*/
arrowTitle: string | React.ReactNode;
/**
* @en arrow name description
* @version 1.0.0
*/
titleDescription?: string;
/**
* @en Arrow value
* @version 1.0.0
*/
arrowValue: string | number | React.ReactNode;
/**
* @en Distance between arrow and bar
* @version 1.0.0
*/
distance?: number;
/**
* @en Arrow value description
* @version 1.0.0
*/
description?: string;
/**
* @en Callback on Tooltip Showing
* @version 1.21.0
*/
onTooltipShow?: () => void;
/**
* @en Callback on Tooltip Hiding
* @version 1.21.0
*/
onTooltipHide?: () => void;
};
export interface ParsedArrow extends Arrow {
fromCat: string;
toCat: string;
key: string;
fromIndex: number;
toIndex: number;
fromOffset: number;
toOffset: number;
}