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

Function legend

docs/app/js/sanddance-app.js:3371–3391  ·  view source on GitHub ↗
(column, fill)

Source from the content-addressed store, hash-verified

3369parcelHelpers.defineInteropFlag(exports);
3370parcelHelpers.export(exports, "getLegends", ()=>getLegends);
3371function legend(column, fill) {
3372 const legend1 = {
3373 orient: "none",
3374 title: column.name,
3375 fill,
3376 encode: {
3377 symbols: {
3378 update: {
3379 shape: {
3380 value: "square"
3381 }
3382 }
3383 }
3384 }
3385 };
3386 if (column.quantitative) {
3387 legend1.type = "symbol";
3388 legend1.format = "~r";
3389 }
3390 return legend1;
3391}
3392function getLegends(context, fill) {
3393 const { specColumns , insight } = context;
3394 if (specColumns.color && !insight.hideLegend && !insight.directColor && !specColumns.color.isColorData) return [

Callers 1

getLegendsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected