MCPcopy
hub / github.com/plotly/plotly.js / mockBoxPlot

Function mockBoxPlot

test/jasmine/tests/box_test.js:1646–1664  ·  view source on GitHub ↗
(dataWithoutTraceType, layout)

Source from the content-addressed store, hash-verified

1644 'use strict';
1645
1646 function mockBoxPlot(dataWithoutTraceType, layout) {
1647 var traceTemplate = { type: 'box' };
1648
1649 var dataWithTraceType = dataWithoutTraceType.map(function(trace) {
1650 return Lib.extendFlat({}, traceTemplate, trace);
1651 });
1652
1653 var gd = {
1654 data: dataWithTraceType,
1655 layout: layout || {},
1656 calcdata: [],
1657 _context: {locale: 'en', locales: {}}
1658 };
1659
1660 supplyAllDefaults(gd);
1661 Plots.doCalcdata(gd);
1662
1663 return gd;
1664 }
1665
1666 it('should set unit width for categories in overlay mode', function() {
1667 var gd = mockBoxPlot([{

Callers 1

box_test.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…