Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type): fix treePathInfo is missing in the type of sunburst formatter callback #18310

Merged
merged 1 commit into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/chart/sunburst/SunburstSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)[]
/**
Expand All @@ -118,7 +119,8 @@ interface SortParam {
getValue(): number
}
export interface SunburstSeriesOption extends
SeriesOption<SunburstStateOption, SunburstStatesMixin>, SunburstStateOption,
SeriesOption<SunburstStateOption<SunburstDataParams>, SunburstStatesMixin>,
SunburstStateOption<SunburstDataParams>,
SunburstColorByMixin,
CircleLayoutOptionMixin {

Expand All @@ -142,6 +144,8 @@ export interface SunburstSeriesOption extends

renderLabelForZeroData?: boolean

data?: SunburstSeriesNodeItemOption[]

levels?: SunburstSeriesLevelOption[]

animationType?: 'expansion' | 'scale'
Expand Down
4 changes: 2 additions & 2 deletions src/util/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
}

/**
Expand Down