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

Function validateCornerradius

src/traces/bar/defaults.js:96–108  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

94// If the given cornerradius value is a numeric string, it will be converted
95// to a number.
96function validateCornerradius(r) {
97 if (isNumeric(r)) {
98 r = +r;
99 if (r >= 0) return r;
100 } else if (typeof r === 'string') {
101 r = r.trim();
102 if (r.slice(-1) === '%' && isNumeric(r.slice(0, -1))) {
103 r = +r.slice(0, -1);
104 if (r >= 0) return r + '%';
105 }
106 }
107 return undefined;
108}
109
110function handleText(traceIn, traceOut, layout, coerce, textposition, opts) {
111 opts = opts || {};

Callers 3

crossTraceDefaultsFunction · 0.85
layout_defaults.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…