MCPcopy Create free account
hub / github.com/microsoft/SandDance / legendEntryLayout

Function legendEntryLayout

docs/tests/v2/es6/js/sanddance.js:104433–104444  ·  view source on GitHub ↗
(entries)

Source from the content-addressed store, hash-verified

104431}
104432
104433function legendEntryLayout(entries) {
104434 // get max widths for each column
104435 var widths = entries.reduce(function (w, g) {
104436 w[g.column] = Math.max(g.bounds.x2 - g.x, w[g.column] || 0);
104437 return w;
104438 }, {}); // set dimensions of legend entry groups
104439
104440 entries.forEach(function (g) {
104441 g.width = widths[g.column];
104442 g.height = g.bounds.y2 - g.y;
104443 });
104444}
104445},{"../constants":"OeAt","vega-scenegraph":"AgKg"}],"Mnvo":[function(require,module,exports) {
104446"use strict";
104447

Callers 1

legendLayoutFunction · 0.70

Calls 2

maxMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected