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

Function getPixelShift

src/components/shapes/helpers.js:356–363  ·  view source on GitHub ↗
(axis, shift)

Source from the content-addressed store, hash-verified

354
355exports.getPixelShift = getPixelShift;
356function getPixelShift(axis, shift) {
357 shift = shift || 0;
358 var shiftPixels = 0;
359 if(shift && axis && (axis.type === 'category' || axis.type === 'multicategory')) {
360 shiftPixels = (axis.r2p(1) - axis.r2p(0)) * shift;
361 }
362 return shiftPixels;
363}

Callers 1

helpers.jsFile · 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…