Title: Feature: allow typed arrays to be used for the data.transforms.groups value · Issue #4397 · plotly/plotly.js · GitHub
Open Graph Title: Feature: allow typed arrays to be used for the data.transforms.groups value · Issue #4397 · plotly/plotly.js
X Title: Feature: allow typed arrays to be used for the data.transforms.groups value · Issue #4397 · plotly/plotly.js
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 be...
Open Graph 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 colo...
X 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 colo...
Opengraph URL: https://github.com/plotly/plotly.js/issues/4397
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature: allow typed arrays to be used for the data.transforms.groups value","articleBody":"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:\r\n```\r\n{\r\n type: 'scattergl',\r\n mode: 'markers',\r\n transforms: [{\r\n type: 'groupby',\r\n groups: [1, 2, 3]\r\n }]\r\n}\r\n```\r\nit would be \r\n```\r\n{\r\n type: 'scattergl',\r\n mode: 'markers',\r\n transforms: [{\r\n type: 'groupby',\r\n groups: new Uint8Array([1, 2, 3])\r\n }]\r\n}\r\n```\r\nI looked at the code, and it seems to be as easy as changing the line 175 in [groupby.js](https://github.com/plotly/plotly.js/blob/master/src/transforms/groupby.js) from:\r\n`if(!(Array.isArray(groups)) || groups.length === 0) {`\r\nto something like:\r\n`if(!(Array.isArray(groups) || groups.constructor === Uint8Array) || groups.length === 0) {`\r\n\r\nwould this be doable? Thanks!\r\n","author":{"url":"https://github.com/danieljblinick","@type":"Person","name":"danieljblinick"},"datePublished":"2019-12-02T12:20:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4397/plotly.js/issues/4397"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4150f8bd-e137-581b-ccb3-b789ce28f2f7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCE0:3239B0:3A068E:4BBEA2:6A5979B4 |
| html-safe-nonce | 6f02c43ade3b7b6c423014ecf54f4d20c49cee7879881519e3317f5cd825af37 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0UwOjMyMzlCMDozQTA2OEU6NEJCRUEyOjZBNTk3OUI0IiwidmlzaXRvcl9pZCI6IjgwMTAyNTcwOTAyNDMxMTczMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ca970e586ee5c2bd8c6a79fb0621c6bd0dda98ae9eb92e9eb975b301c01e42f9 |
| hovercard-subject-tag | issue:531092343 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/4397/issue_layout |
| twitter:image | https://opengraph.githubassets.com/511672dd2ab556e6bf95cd4254b3015d274f995867bb42413efd7fbfb1a5c54e/plotly/plotly.js/issues/4397 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/511672dd2ab556e6bf95cd4254b3015d274f995867bb42413efd7fbfb1a5c54e/plotly/plotly.js/issues/4397 |
| og:image:alt | 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 colo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danieljblinick |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624bb50a7497aa346bef8cc3743af408a9ea10ca |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width