* Helper function to get the items that intersect the event position * @param {ChartElement[]} items - elements to filter * @param {object} position - the point to be nearest to * @return {ChartElement[]} the nearest items
(chart, position)
| 6750 | * @return {ChartElement[]} the nearest items |
| 6751 | */ |
| 6752 | function getIntersectItems(chart, position) { |
| 6753 | var elements = []; |
| 6754 | |
| 6755 | parseVisibleItems(chart, function(element) { |
| 6756 | if (element.inRange(position.x, position.y)) { |
| 6757 | elements.push(element); |
| 6758 | } |
| 6759 | }); |
| 6760 | |
| 6761 | return elements; |
| 6762 | } |
| 6763 | |
| 6764 | /** |
| 6765 | * Helper function to get the items nearest to the event position considering all visible items in teh chart |
no test coverage detected