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

Function mockBarPlot

test/jasmine/tests/bar_test.js:2874–2892  ·  view source on GitHub ↗
(dataWithoutTraceType, layout)

Source from the content-addressed store, hash-verified

2872});
2873
2874function mockBarPlot(dataWithoutTraceType, layout) {
2875 var traceTemplate = { type: 'bar' };
2876
2877 var dataWithTraceType = dataWithoutTraceType.map(function(trace) {
2878 return Lib.extendFlat({}, traceTemplate, trace);
2879 });
2880
2881 var gd = {
2882 data: dataWithTraceType,
2883 layout: layout || {},
2884 calcdata: [],
2885 _context: {locale: 'en', locales: {}}
2886 };
2887
2888 supplyAllDefaults(gd);
2889 Plots.doCalcdata(gd);
2890
2891 return gd;
2892}
2893
2894function assertArrayField(calcData, prop, expectation) {
2895 var values = Lib.nestedProperty(calcData, prop).get();

Callers 1

bar_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…