Skip to content

xAccessor as a function #551

@nickofthyme

Description

@nickofthyme

Currently, all accessors are a string or number to be used as lookup keys on an array or object (aka the Datum)

const accessor = 'x';
const datum = {
  x: 'a',
};
const x = datum[accessor];

This proposal would introduce the idea of the xAccessor as being a function such as...

const accessor = (d: Datum) => d.x ?? '_all';
const datum = {
  x: 'a',
};
const x = accessor(datum);

Metadata

Metadata

Assignees

No one assigned

    Labels

    :specsChart specifications related issue:vislibRelating to vislib replacementenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions