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

Function mimickAxisDefaults

src/traces/carpet/ab_defaults.js:24–59  ·  view source on GitHub ↗
(traceIn, traceOut, fullLayout, dfltColor)

Source from the content-addressed store, hash-verified

22};
23
24function mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) {
25 var axesList = ['aaxis', 'baxis'];
26
27 axesList.forEach(function(axName) {
28 var axLetter = axName.charAt(0);
29 var axIn = traceIn[axName] || {};
30 var axOut = Template.newContainer(traceOut, axName);
31
32 var defaultOptions = {
33 noAutotickangles: true,
34 noTicklabelshift: true,
35 noTicklabelstandoff: true,
36 noTicklabelstep: true,
37 tickfont: 'x',
38 id: axLetter + 'axis',
39 letter: axLetter,
40 font: traceOut.font,
41 name: axName,
42 data: traceIn[axLetter],
43 calendar: traceOut.calendar,
44 dfltColor: dfltColor,
45 bgColor: fullLayout.paper_bgcolor,
46 autotypenumbersDflt: fullLayout.autotypenumbers,
47 fullLayout: fullLayout
48 };
49
50 handleAxisDefaults(axIn, axOut, defaultOptions);
51 axOut._categories = axOut._categories || [];
52
53 // so we don't have to repeat autotype unnecessarily,
54 // copy an autotype back to traceIn
55 if(!traceIn[axName] && axIn.type !== '-') {
56 traceIn[axName] = {type: axIn.type};
57 }
58 });
59}

Callers 1

ab_defaults.jsFile · 0.85

Calls 1

handleAxisDefaultsFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…