Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brushing action crashes the the browser's window #1171

Closed
darnautov opened this issue May 27, 2021 · 1 comment · Fixed by #1212
Closed

Brushing action crashes the the browser's window #1171

darnautov opened this issue May 27, 2021 · 1 comment · Fixed by #1212
Assignees
Labels
bug Something isn't working :heatmap Heatmap/Swimlane chart related issue released Issue released publicly

Comments

@darnautov
Copy link
Contributor

Describe the bug
Brushing over numerical categorical data causing the browser's window to crash

To Reproduce
Provide chart data that contain numbers on the X-axis. You can pass 6236f697-f919-4d1b-a697-01c5cce7b81b to the xAccessor from this sample data.

Check sample data
[
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 210,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 333
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 44,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 298
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 165,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 215
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": "__other__",
  "b6dcf411-56af-4df5-b572-17602e2825f5": 89
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 150,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 343
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 165,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 215
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 110,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 205
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Shoes",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": "__other__",
  "b6dcf411-56af-4df5-b572-17602e2825f5": 83.33333333333333
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 210,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 333
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 155,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 317
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 110,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 193
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": "__other__",
  "b6dcf411-56af-4df5-b572-17602e2825f5": 65
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 210,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 277.5
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 165,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 248
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 200,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 225
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Men's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": "__other__",
  "b6dcf411-56af-4df5-b572-17602e2825f5": 64.125
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 150,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 343
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 200,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 225
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 115,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 144
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Accessories",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": "__other__",
  "b6dcf411-56af-4df5-b572-17602e2825f5": 61.46875
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 150,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 343
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 165,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 215
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": 80,
  "b6dcf411-56af-4df5-b572-17602e2825f5": 210.5
},
{
  "79b13663-d722-4554-8746-b35c4a266673": "Women's Clothing",
  "6236f697-f919-4d1b-a697-01c5cce7b81b": "__other__",
  "b6dcf411-56af-4df5-b572-17602e2825f5": 57.96527777777778
}
]

Expected behaviour
Brushing actions doesn't crush a browser's window

Screenshots
May-27-2021 14-57-51_

Version (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Elastic Charts: @latest

Kibana Cross Issues
elastic/kibana#97978

@darnautov darnautov added bug Something isn't working :heatmap Heatmap/Swimlane chart related issue labels May 27, 2021
@nickofthyme nickofthyme changed the title Brushing action crushes the the browser's window Brushing action crashes the the browser's window May 27, 2021
@markov00 markov00 self-assigned this Jun 21, 2021
markov00 added a commit that referenced this issue Jun 24, 2021
The brush tool is now available on heatmap with categorical axes. The `onBrushEnd` callback will receive an array of values for both the x and the y coordinates corresponding to the brushed area.

fix #1170, fix #1171
nickofthyme pushed a commit that referenced this issue Jun 29, 2021
# [31.0.0](v30.2.0...v31.0.0) (2021-06-29)

### Bug Fixes

* **xy:** render gridlines behind axis  ([#1204](#1204)) ([38ebe2d](38ebe2d)), closes [#1203](#1203)
* memory leak related to re-reselect cache ([#1201](#1201)) ([02025cf](02025cf))
* **partition:** getLegendItemsExtra no longer assumes a singleton ([#1199](#1199)) ([100145b](100145b))

### Features

* **annotations:** option to render rect annotations outside chart ([#1207](#1207)) ([4eda382](4eda382))
* **heatmap:** enable brushing on categorical charts ([#1212](#1212)) ([10c3493](10c3493)), closes [#1170](#1170) [#1171](#1171)
* **xy:** add onPointerUpdate debounce and trigger options ([#1194](#1194)) ([a9a9b25](a9a9b25))

### BREAKING CHANGES

* **xy:** the `PointerOverEvent` type now extends `ProjectedValues` and drops value. This effectively replaces value with `x`, `y`, `smVerticalValue` and `smHorizontalValue`.
@nickofthyme
Copy link
Collaborator

🎉 This issue has been resolved in version 31.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Jun 29, 2021
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
# [31.0.0](elastic/elastic-charts@v30.2.0...v31.0.0) (2021-06-29)

### Bug Fixes

* **xy:** render gridlines behind axis  ([opensearch-project#1204](elastic/elastic-charts#1204)) ([bf9ccbd](elastic/elastic-charts@bf9ccbd)), closes [#1203](elastic/elastic-charts#1203)
* memory leak related to re-reselect cache ([opensearch-project#1201](elastic/elastic-charts#1201)) ([8cb6876](elastic/elastic-charts@8cb6876))
* **partition:** getLegendItemsExtra no longer assumes a singleton ([opensearch-project#1199](elastic/elastic-charts#1199)) ([ecbcc1e](elastic/elastic-charts@ecbcc1e))

### Features

* **annotations:** option to render rect annotations outside chart ([opensearch-project#1207](elastic/elastic-charts#1207)) ([ddffc00](elastic/elastic-charts@ddffc00))
* **heatmap:** enable brushing on categorical charts ([opensearch-project#1212](elastic/elastic-charts#1212)) ([5c426b3](elastic/elastic-charts@5c426b3)), closes [opensearch-project#1170](elastic/elastic-charts#1170) [opensearch-project#1171](elastic/elastic-charts#1171)
* **xy:** add onPointerUpdate debounce and trigger options ([opensearch-project#1194](elastic/elastic-charts#1194)) ([aa068f6](elastic/elastic-charts@aa068f6))

### BREAKING CHANGES

* **xy:** the `PointerOverEvent` type now extends `ProjectedValues` and drops value. This effectively replaces value with `x`, `y`, `smVerticalValue` and `smHorizontalValue`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :heatmap Heatmap/Swimlane chart related issue released Issue released publicly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants