Skip to content

Channel label option #1733

@Fil

Description

@Fil

In this discussion we realize that to specify a channel label (for the interactive tips #1612), we need either a {transform, label} value, or an arcane combination of an accessor function with a label property:

channels: {year: Object.assign((d) => d.year, {label: "My custom year label"})} 

This is because labelof only reads the value.

It would be nice to be allowed to write instead:

channels: {year: {value: "year", label: "My custom year label"}}

Note that this is not strictly necessary for the given use case, since we can also name the channel as we want (although not with a string which has precedence over the channel’s key name):

channels: {["My custom year label"]: d => d.year}

(maybe related to #1364)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew 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