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

Charts: clickthrough to filtered doctype or other report #25740

Open
casesolved-co-uk opened this issue Mar 30, 2024 · 0 comments
Open

Charts: clickthrough to filtered doctype or other report #25740

casesolved-co-uk opened this issue Mar 30, 2024 · 0 comments

Comments

@casesolved-co-uk
Copy link
Contributor

A potential customer has commented that charts are severely limited if clickthroughs are not implemented.

I have looked into the frappe charts library and the click event is accessible with some property data:

frappe/charts#383

fire(this.parent, "data-select", this.getDataPoint());
https://github.com/frappe/charts/blob/f33309601201776c9f724e46badadaeef4663358/src/js/charts/AxisChart.js#L844

lineCompositeChart.parent.addEventListener('data-select', (e) => {
https://github.com/frappe/charts/blob/f33309601201776c9f724e46badadaeef4663358/docs/assets/js/index.js#L20

export function fire(target, type, properties) {
https://github.com/frappe/charts/blob/f33309601201776c9f724e46badadaeef4663358/src/js/utils/dom.js#L114

So I imagine the following needs to happen:

  • frappe needs to listen to the relevant chart events to trigger a route change
  • all chart datapoints need to be annotated with the correct doctype/report and filters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant