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

Auto highlight tooltip. #45

Closed
sujalBandhara opened this issue Oct 10, 2019 · 3 comments
Closed

Auto highlight tooltip. #45

sujalBandhara opened this issue Oct 10, 2019 · 3 comments

Comments

@sujalBandhara
Copy link

sujalBandhara commented Oct 10, 2019

Hello is there any way to highlight default tooltip with out tap or click on chart for any particular data point?

@sujalBandhara sujalBandhara changed the title Auto populate tooltip. Auto highlight tooltip. Oct 10, 2019
@dharanidharandharmasivam
Copy link
Contributor

Hi @sujalBandhara ,

Greetings from Syncfusion. Your requirement for showing the tooltip without tapping the chart area can be achieved using the show method of the tooltip. Here you need to pass the x and y logical pixels. If the data point is available in the specified location, then the tooltip will be shown. For more information on this approach, find the user guide.

For your convenience, we have prepared a sample. Here when you click on the Show Tooltip button, the tooltip will be displayed in the specified location.

If this is not your exact requirement, kindly revert us with more information which will be helpful in further analysis and provide you the solution sooner.

Thanks,
Dharani.

@sujalBandhara
Copy link
Author

Ok thanks for the updates, Is there any way to get all data points position after graph line draw?

@dharanidharandharmasivam
Copy link
Contributor

Hi @sujalBandhara ,

We regret the delay. As of now, you can get the location of points using the onTooltipRender event. With the below code snippet, we have printed the location of the first point. You can change this based on your scenario.

 SfCartesianChart(
    onTooltipRender: (TooltipArgs args){
      final int pointIndex = 0;
      print(args.dataPoints[pointIndex].region);
   },
)

Thanks,
Dharani.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants