Open edomazi opened 4 years ago
I have the same problem with bar chart!
If you see on demo, when isNavigable is true, frappe select automatically last element. For mitigating that, I added a fake label (blank) and a fake value (0) as last label/value.
I know this is not "the solution". In the meantime do you discover something about it? thanks!
@edomazi
I'd like to be able to click the last point and get the information (value and label data) but I'm not able to.
Thanks for reporting this. Sure seems like something missing in the library. Just to avoid any confusion, from what I understand you want the event to be triggered automatically for the last item, without have the user to click it themselves?
If you see on demo, when isNavigable is true, frappe select automatically last element.
Yes, this behaviour is intentionally added. Any reason you don't want it selected by default?
@scmmishra
Thanks for answering. No, I'd like, when isNavigable is true, to have no item selected as default (now it automatically selects the last point as hammeronthenet said too). So if a user decides to click on the last point when the chart loads he would be able to and therefore I will do some parsing with the data point he just clicked on.
To be clear, I'm able to get the values from the last point but only if firstly i click on another one then on the last one.
We can have a configuration, navigateToLastItem
option, with default set to true.
How does this sound?
That sounds great. So everyone is free to use this how they please
Yes, for example when I have two charts connected. The first present the main data and the second (onclick) is the detail of the first one. If someone clicks on the last value he is unable to select the data and the only way is to click another "bar" and next click the wanted.
Il ven 26 giu 2020, 11:59 Shivam Mishra notifications@github.com ha scritto:
If you see on demo, when isNavigable is true, frappe select automatically last element.
Yes, this behaviour is intentionally added. Any reason you don't want it selected by default?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/frappe/charts/issues/258#issuecomment-650096936, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH7JGT6COZVD3QBJWA4VJPTRYRWRPANCNFSM4JVFO57A .
I have the following chart in which I'd like to be able to click the last point and get the information (value and label data) but I'm not able to. I need to click on it directly and not clicking firstly on another and then on the last one. Am I missing something?
Chart demo: https://codepen.io/edomazi/pen/zYxxjVy
Frappé Charts version: 1.3.0