未验证 提交 9c743bee 编写于 作者: Z Zhongxiang Wang 提交者: GitHub

Merge pull request #18310 from apache/fix/sunburst-types

fix(type): fix `treePathInfo` is missing in the type of sunburst formatter callback
......@@ -50,7 +50,7 @@ interface SunburstItemStyleOption<TCbParams = never> extends ItemStyleOption<TCb
borderRadius?: (number | string)[] | number | string
}
interface SunburstLabelOption extends Omit<SeriesLabelOption, 'rotate' | 'position'> {
interface SunburstLabelOption extends Omit<SeriesLabelOption<SunburstDataParams>, 'rotate' | 'position'> {
rotate?: 'radial' | 'tangential' | number
minAngle?: number
silent?: boolean
......@@ -77,8 +77,8 @@ export interface SunburstStateOption<TCbParams = never> {
}
export interface SunburstSeriesNodeItemOption extends
SunburstStateOption<CallbackDataParams>,
StatesOptionMixin<SunburstStateOption<CallbackDataParams>, SunburstStatesMixin>,
SunburstStateOption<SunburstDataParams>,
StatesOptionMixin<SunburstStateOption<SunburstDataParams>, SunburstStatesMixin>,
OptionDataItemObject<OptionDataValue>
{
nodeClick?: 'rootToNode' | 'link' | false
......@@ -92,8 +92,9 @@ export interface SunburstSeriesNodeItemOption extends
cursor?: string
}
export interface SunburstSeriesLevelOption
extends SunburstStateOption, StatesOptionMixin<SunburstStateOption, SunburstStatesMixin> {
export interface SunburstSeriesLevelOption extends
SunburstStateOption<SunburstDataParams>,
StatesOptionMixin<SunburstStateOption<SunburstDataParams>, SunburstStatesMixin> {
radius?: (number | string)[]
/**
......@@ -118,7 +119,8 @@ interface SortParam {
getValue(): number
}
export interface SunburstSeriesOption extends
SeriesOption<SunburstStateOption, SunburstStatesMixin>, SunburstStateOption,
SeriesOption<SunburstStateOption<SunburstDataParams>, SunburstStatesMixin>,
SunburstStateOption<SunburstDataParams>,
SunburstColorByMixin,
CircleLayoutOptionMixin {
......@@ -142,6 +144,8 @@ export interface SunburstSeriesOption extends
renderLabelForZeroData?: boolean
data?: SunburstSeriesNodeItemOption[]
levels?: SunburstSeriesLevelOption[]
animationType?: 'expansion' | 'scale'
......
......@@ -1064,8 +1064,8 @@ export interface LabelOption extends TextCommonOption {
rich?: Dictionary<TextCommonOption>
}
export interface SeriesLabelOption extends LabelOption {
formatter?: string | LabelFormatterCallback<CallbackDataParams>
export interface SeriesLabelOption<T extends CallbackDataParams = CallbackDataParams> extends LabelOption {
formatter?: string | LabelFormatterCallback<T>
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册