SandDance
SandDance copied to clipboard
Support for `BigInt`
I have a data source with a column of BigInt numbers, however when I load the source into Sanddance I get the error
TypeError: Cannot convert a BigInt value to a number
I'm wondering if there's any interest or plans around supporting javascript's built-in BigInt primitive in the future. Cheers
Can you provide a small example?
Sure, something like the following
<Explorer
logoClickUrl="https://microsoft.github.io/SandDance/"
mounted={(explorer: any) => {
explorer.load([
{name: "a", val: BigInt(9007199254740992)},
{name: "b", val: BigInt(9007199254740993)},
{name: "c", val: BigInt(9007199254740994)},
]);
}}
/>
Support for this might need to wait for a major breaking change since this type is near the bottom of the stack: https://github.com/microsoft/SandDance/blob/main/packages/chart-types/src/column.ts#L82