so I wanna make chart look like the image.
from documentation, it use TrackballBehavior. but Icant have the tooltip like image.
when I combine TrackballBehavior and TooltipBehavior, the tool tip wont show alongside the trackball, except when I clicked on Line.
Could the Flutter team help me how to solve this problem ?
Hi Lukito,
Greetings from Syncfusion. By default, the trackball line gets rendered on the tooltip when enabled both tooltipBehavior and trackballBehavior tooltip. We suggest not to use both tooltips at a time. However, we have achieved your scenario with the help of positioned widget and show the custom widget on the top of the chart with the position got from the onTooltipRender callback. Then hide the custom widget when tapping up on the chart with the help of onChartTouchInteractionUp callback, here we have set the offset value of the custom widget to infinite then it gets hidden. We have attached the sample below to achieve your requirement and this can be changed based on your scenario.
Screenshot:
Regards,
Yuvaraj.
Hi Yuvaraj Gajaraj,
I have the same problem when using combine between TrackballBehavior and TooltipBehavior.
I need to show maker when hovering into chart and also showing tooltip. In tooltip content, I have a button, and I want I can click it.
Currently, when I click into button, click listener is not called due to TrackballBehavior handed listener before TooltipBehavior.
Can we do it (show tooltip and can click tooltip content) by just use TrackballBehavior ?
Thank you
Hi Micky,
We have checked your query at our end, and we would like to let you know that the trackball tooltip builder can only be used to render custom widget for displaying the chart data point values in a custom view. So any user interaction gestures (such as button click) performed on the custom tooltip will not be detected. This is the current default behavior.
Regards,
Sriram Kiran
Hi Sriram Kiran, Lukito,
I see. Thanks for your quick reply, Sriram Kiran.
I have one more question. Somehow, is it possible to implement through my scenario ?
Currently:
- If I just use TooltipBehavior, I can handle click button in tooltip content, but the marker is not shown when I hover or click into.
- If I just use TrackballBehavior, I can't get button click event.
- If I combine them, click event is being handled by TrackballBehavior, not TooltipBehavior
Thank you.
Hi Micky,
We are analyzing your query at our end, and we will update further details in one business day.
Regards,
Hi Micky,
We are sorry that currently there is no feasible workaround to achieve your requirement with the current chart source. However, we have considered your requirement as a feature request and have logged it in our feedback portal. We will prioritize the features of every release based on demand and priority. So, this feature will be available in any of our upcoming releases. You can also track the status of the feature with the feedback below.
https://www.syncfusion.com/feedback/37658
Regards,
Sriram Kiran
Hi Sriram Kiran,
I got it.
Hopefully this will be found in the nearest release soon
Thanks for your support !
Hi Micky,
Thanks for your co-operation. We are sorry that we do not have a definite timeline for this implementation, but this is under our product development team’s active review. Once we have anything definite to share about the implementation, we will update that information in the feedback link, and we appreciate your patience until then. You can track the status in the feedback link.
https://www.syncfusion.com/feedback/37658
Regards,
Sriram Kiran