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

Function handleMarkerDefaults

src/traces/pie/defaults.js:36–50  ·  view source on GitHub ↗
(traceIn, traceOut, layout, coerce, isPie)

Source from the content-addressed store, hash-verified

34}
35
36function handleMarkerDefaults(traceIn, traceOut, layout, coerce, isPie) {
37 var lineWidth = coerce('marker.line.width');
38 if (lineWidth) {
39 coerce(
40 'marker.line.color',
41 isPie ? undefined : layout.paper_bgcolor // case of funnelarea, sunburst, icicle, treemap
42 );
43 }
44
45 var markerColors = coerce('marker.colors');
46 coercePattern(coerce, 'marker.pattern', markerColors);
47 // push the marker colors (with s) to the foreground colors, to work around logic in the drawing pattern code on marker.color (without s, which is okay for a bar trace)
48 if (traceIn.marker && !traceOut.marker.pattern.fgcolor) traceOut.marker.pattern.fgcolor = traceIn.marker.colors;
49 if (!traceOut.marker.pattern.bgcolor) traceOut.marker.pattern.bgcolor = layout.paper_bgcolor;
50}
51
52function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
53 function coerce(attr, dflt) {

Callers 15

defaults.jsFile · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85
supplyDefaultsFunction · 0.85
defaults.jsFile · 0.85
defaults.jsFile · 0.85

Calls 1

coerceFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…