MCPcopy
hub / github.com/plotly/plotly.js / hoverInfoNodes

Function hoverInfoNodes

test/jasmine/tests/hover_label_test.js:1952–1965  ·  view source on GitHub ↗
(traceName)

Source from the content-addressed store, hash-verified

1950 });
1951
1952 function hoverInfoNodes(traceName) {
1953 var g = d3SelectAll('g.hoverlayer g.hovertext').filter(function () {
1954 return !d3Select(this)
1955 .select('[data-unformatted="' + traceName + '"]')
1956 .empty();
1957 });
1958
1959 return {
1960 primaryText: g.select('text:not([data-unformatted="' + traceName + '"])').node(),
1961 primaryBox: g.select('path').node(),
1962 secondaryText: g.select('[data-unformatted="' + traceName + '"]').node(),
1963 secondaryBox: g.select('rect').node()
1964 };
1965 }
1966
1967 function ensureCentered(hoverInfoNodes) {
1968 expect(hoverInfoNodes.primaryText.getAttribute('text-anchor')).toBe('middle');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…