SandDance icon indicating copy to clipboard operation
SandDance copied to clipboard

Support for `BigInt`

Open Buroni opened this issue 4 years ago • 3 comments

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

Buroni avatar Sep 23 '21 14:09 Buroni

Can you provide a small example?

danmarshall avatar Sep 23 '21 19:09 danmarshall

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)},
    ]);
  }}
/>

Buroni avatar Sep 24 '21 11:09 Buroni

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

danmarshall avatar Feb 08 '23 21:02 danmarshall