Skip to content

Define an interface for Legends #1722

@kum-deepak

Description

@kum-deepak

Currently, legend instance call functions in the chart instance. This works, however, it is inconsistent. Sometimes the chart instance is accessed as the _parent and sometimes as chart member in the legendable. Usually, these are the same unless it is a Composite Chart. This is likely to cause inconsistent or sub-optimal behavior for legends in Composite Charts.

In addition, the code that checks if an entry is currently selected is quite fragile (https://github.com/dc-js/dc.js/blob/develop/src/charts/legend.js#L233).

We can explore if any alternate way of structuring is likely to give better code structuring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions