(select) events on charts should return key event data
See original GitHub issueI’m submitting a … (check one with “x”)
- bug report - search github for a similar issue or PR before submitting
- feature request
- support request - use StackOverflow (add the
ngx-charts
tag) or the gitter chat for support questions
Current behavior
(select) events include only name and value, not key events. That makes me do more work to determine if the control or shift key is down. Expected behavior
I would like to be able to test if the control or shift key is down. The event that is returned should have more information than just name and value. Reproduction of the problem
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- ngx-charts version: x.x.x
10.0.0
- Angular version: x.x.x
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
- Language: [all | TypeScript X.X | ES6/7 | ES5]
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Handling Events | Charts - Google Developers
There is one event that any selectable chart should fire: the select event. ... which returns an array of objects describing the selected...
Read more >Click events on Pie Charts in Chart.js - Stack Overflow
Looks for the element under the event point, then returns all elements at the same data index. This is used internally for 'label'...
Read more >chart.events.selection | highcharts API Reference
Through event.options you can access the series options that were passed to the addSeries method. Returning false prevents the series from being added....
Read more >Chart Events in Microsoft Excel - Peltier Tech
These event procedures can trap events in the worksheet, ... When you select an element in Chart A, you'll return to the main...
Read more >Interactions - Chart.js
Converting Events to Data Values. A common occurrence is taking an event, such as a click, and finding the data coordinates on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is an ‘extra’ field for holding and returning any data you need on a select event. See: https://github.com/swimlane/ngx-charts/issues/1269
In fact, not only should it return more click data (mouse info, plus ctrl-key and shift-key status) but it should also return user data attached to the element. The name and value may not be unique among the data points. Compare how JavaFX lets the user set userData on a node.