MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / getIntersectItems

Function getIntersectItems

static/plugins/chart.js/Chart.bundle.js:6752–6762  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

6750 * @return {ChartElement[]} the nearest items
6751 */
6752function 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

Callers 2

indexModeFunction · 0.70
Chart.bundle.jsFile · 0.70

Calls 1

parseVisibleItemsFunction · 0.70

Tested by

no test coverage detected