- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
Closed
Labels
featuresomething newsomething new
Description
I have a very high cardinality data set that I am trying to store only in typed arrays. Plotly already accepts typed arrays for the data.x and data.y values, which is great. However, I want to color the points based on the groups they belong to, and I would like to store those groups in a typed array as well. So instead of:
{
      type: 'scattergl',
      mode: 'markers',
      transforms: [{
        type: 'groupby',
        groups: [1, 2, 3]
      }]
}
it would be
{
      type: 'scattergl',
      mode: 'markers',
      transforms: [{
        type: 'groupby',
        groups: new Uint8Array([1, 2, 3])
      }]
}
I looked at the code, and it seems to be as easy as changing the line 175 in groupby.js from:
if(!(Array.isArray(groups)) || groups.length === 0) {
to something like:
if(!(Array.isArray(groups) || groups.constructor === Uint8Array) || groups.length === 0) {
would this be doable? Thanks!
Metadata
Metadata
Assignees
Labels
featuresomething newsomething new