12 Dec 2022
08:06 AM
- last edited on
20 Apr 2023
12:59 AM
by
educampver
Hello team, I've been getting an error while trying to create the pie chart, I've even copied the code available in the documentation and I've been getting this error:
error: TS2322 Type '{ slices: { category: string; value: number; }[]; unit: string; }' is not assignable to type '{ category: string; value: number; }[]'.
Any ideas on why it might be doing this ?
Solved! Go to Solution.
Hey,
looks like you instead of passing the whole conversions object into the pie chart, you are only passing in the slices array. Can you share your code?
I've noticed that there has been a working solution proposed on our internal Slack, so I am cross-posting it here as a reference for others encountering the same problem.
{ slices: { category: string; value: number; }[]; unit: string; }
{ category: string; value: number }[]