Unplanned
Last Updated: 24 Aug 2021 13:26 by ADMIN
Timothy
Created on: 08 Feb 2013 04:07
Category: Kendo UI for jQuery
Type: Feature Request
2
Access current dataItem in plotAreaClick handler
Often when you get a plotAreaClick, a specific dataItem is highlighted with a tooltip showing.

When this happens, if you click on the plot area, but miss the actual data point, I would like to execute code like if seriesClick was triggered.

Example: in my tooltip I tell people to "Click to search", which opens a dialog with extra information about that data point. This works great in my seriesClick handler, since I can access the data point. If they miss the point, it triggers a plotAreaClick. They still see the tooltip for the item, but I can't open the search as I don't know which dataItem is current.

An alternative solution would be to expose whichever dataItem is currently responsible for the tooltip.
2 comments
Timothy
Posted on: 08 Feb 2013 04:58
Oh, another issue I found related to trying to work around this is that the plotAreaClick is triggered even if a seriesClick is triggered, so I would need some way to only open one dialog if they click accurately.
Timothy
Posted on: 08 Feb 2013 04:55
I notice that I can do the following in the event handler:

if (this._activePoint) {
  // TODO: use this._activePoint.dataItem to open dialog
}

Is it safe to refer to this._activePoint? I'm guessing this is an internal value subject to change.

I've also noticed that if my chart has plot bands, the plotAreaClick doesn't trigger on those plot bands.