You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "fireflysemantics (via GitHub)" <gi...@apache.org> on 2023/11/14 14:37:57 UTC
[I] [Feature] Export Type for Click Events [echarts]
fireflysemantics opened a new issue, #19297:
URL: https://github.com/apache/echarts/issues/19297
### What problem does this feature solve?
It would be nice if we had a type for click (And other) events.
Currently we can listen for click events like this:
```
myChart.on('click', function(params) {
// Print name in console
console.log(params.name);
});
```
And the documentation mentions `EventParams` however the type for it is not exported.
More here:
https://stackoverflow.com/questions/77448162/does-echarts-export-the-type-for-click-events
### What does the proposed API look like?
if `EventParams` were exported we could do:
```
myChart.on('click', function(params:EventParams) {
// Print name in console
console.log(params.name);
});
```
And this would give us autocomplete in VSCode for the params.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Export Type for Click Events [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19297:
URL: https://github.com/apache/echarts/issues/19297#issuecomment-3725803520
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Export Type for Click Events [echarts]
Posted by "fireflysemantics (via GitHub)" <gi...@apache.org>.
fireflysemantics commented on issue #19297:
URL: https://github.com/apache/echarts/issues/19297#issuecomment-1883363454
@theMattCode that looked promising. I tried it out and it's missing some of the properties that are contained on the event like `event.value`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Export Type for Click Events [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19297:
URL: https://github.com/apache/echarts/issues/19297#issuecomment-3756865864
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Export Type for Click Events [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #19297: [Feature] Export Type for Click Events
URL: https://github.com/apache/echarts/issues/19297
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] [Feature] Export Type for Click Events [echarts]
Posted by "theMattCode (via GitHub)" <gi...@apache.org>.
theMattCode commented on issue #19297:
URL: https://github.com/apache/echarts/issues/19297#issuecomment-1883246621
Shouldn't do this the trick?
```typescript
import { ECElementEvent, ... } from 'echarts';
myChart.on('click', function(event: ECElementEvent) {
/* .. */
});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org