No, it is your side issue. [string, number][] is an array whose elements are string and number pair. I assume you'd like to type test more specific than (string | number)[][] (NOTE: If so, it is called XY-problem, which you should avoid).
You may want to use const-assertion, which can be done by postfix expression by as const, like this:
const test = [
['C2B', 'D2C', 'PDP', 1],
['C2B', 'D2C', 'PDP', 2],
['C2B', 'D2C', 'PDP', 4],
['C2B', 'D2C', 'PDP', 2],
] as const;
You should change Legend signatures, too:
export const Legend = ({ data }: { data: readonly (readonly [string, string, string, number])[] }) => ...
The test elements are typed an specific type which is subtype of readonly [string, string, string, number]. The outer readonly modifier means entire array is read-only and you cannot change its contents. This is side effect of const-assertion, which does not have opt-out way.
[string, number]instead of(string | number)[]for an array containing a string and a number, a lot more people would be annoyed about it. Consider using a different type like{s: string, n: number}, or just write the type annotation.