MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / pxToPercent

Function pxToPercent

src/components/createDataZoomSlider.ts:130–135  ·  view source on GitHub ↗
(dxPx: number)

Source from the content-addressed store, hash-verified

128 };
129
130 const pxToPercent = (dxPx: number): number | null => {
131 const w = getTrackWidthPx();
132 if (w === null) return null;
133 const p = (dxPx / w) * 100;
134 return Number.isFinite(p) ? p : null;
135 };
136
137 const setPointerCaptureBestEffort = (el: Element, pointerId: number): void => {
138 try {

Callers 1

onMoveFunction · 0.85

Calls 1

getTrackWidthPxFunction · 0.85

Tested by

no test coverage detected