* nearest mode returns the element closest to the point * @function Chart.Interaction.modes.intersect * @param {Chart} chart - the chart we are returning items from * @param {Event} e - the event we are find things at * @param {InteractionOptions} options - options to use * @param {bo
(chart, e, options, useFinalPosition)
| 350 | * @return {InteractionItem[]} - items that are found |
| 351 | */ |
| 352 | nearest(chart, e, options, useFinalPosition) { |
| 353 | const position = getRelativePosition(e, chart); |
| 354 | const axis = options.axis || 'xy'; |
| 355 | const includeInvisible = options.includeInvisible || false; |
| 356 | return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible); |
| 357 | }, |
| 358 | |
| 359 | /** |
| 360 | * x mode returns the elements that hit-test at the current x coordinate |
nothing calls this directly
no test coverage detected