MCPcopy Index your code
hub / github.com/plotly/plotly.js / getHoverLabelOffsets

Function getHoverLabelOffsets

src/components/fx/hover.js:2014–2027  ·  view source on GitHub ↗
(hoverLabel, rotateLabels)

Source from the content-addressed store, hash-verified

2012}
2013
2014function getHoverLabelOffsets(hoverLabel, rotateLabels) {
2015 var offsetX = 0;
2016 var offsetY = hoverLabel.offset;
2017
2018 if (rotateLabels) {
2019 offsetY *= -YSHIFTY;
2020 offsetX = hoverLabel.offset * YSHIFTX;
2021 }
2022
2023 return {
2024 x: offsetX,
2025 y: offsetY
2026 };
2027}
2028
2029/**
2030 * Calculate the shift in x for text and text2 elements

Callers 2

hoverAvoidOverlapsFunction · 0.85
alignHoverTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…