Skip to content

Pie chart typing issue #15143

@jpike88

Description

@jpike88

Version

5.1.2

Steps to reproduce

see this code below:

const chartData: PieSeriesOption['data'] = [];
chartData.push({ name: chartSlice.label, value: chartSlice.count });

What is expected?

There should be no type errors.

What is actually happening?

I get this type error:

Argument of type '{ name: any; value: any; }' is not assignable to parameter of type '(OptionDataValueNumeric & OptionDataValueNumeric[]) & PieDataItemOption'.
Type '{ name: any; value: any; }' is not assignable to type '"-" & OptionDataValueNumeric[] & PieDataItemOption'.
Type '{ name: any; value: any; }' is not assignable to type '"-"'.ts(2345)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions