This is a migrated thread and some comments may be shown as answers.

Open tooltip behaviour programatically

1 Answer 56 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
pelotasplus
Top achievements
Rank 1
pelotasplus asked on 12 Aug 2016, 11:16 AM

I have chart with Y- (days) and X-axis (values), AreaSeries and whatnot and it all works just fine.

When showing tooltip for particular day i simply call

> tooltipBehavior.open(dataPoint);

The problem is that at this particular point dataPoint's getLayoutSlot() returns RadRect.getEmpty() as this particular dataPaint has not been drawn on the chart yet.

Which of course works as expected but neverthenless I need to show this tooltip when chart is shown.

So my question is? How do I know that all data series (AreaSeries) is already drawn on chart so that all dataPoints have layoutSlot set to a real location on chart so that I can show tooltip?

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 17 Aug 2016, 05:49 AM
Hi Aleksander,

Before getting to your question, I would like to ask you for some more details on your Chart setup. When do you want the Tooltip to be shown? Always when the chart is drawn or upon a certain user action?

The simplest way to detect when the chart area has been calculated is to override the arrangeOverride method of RadCartesianChart. That said, you will have to subclass RadCartesianChartView and override the method by calling the super implementation and then doing your custom work.

Regards,
Deyan
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
pelotasplus
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or