Skip to content

Think about the layer abstraction. #16

@dalejung

Description

@dalejung

Right now we have:

Layer.data(df).geom(Line()).geom(Rect())

and

Line().data(df).view()

So Layers are in reality both data and chart builders. In the first example, Layer() is being used to hold data, and Line/Rect are only used for their chart builder. Layer passes its data to the chart builders.

However, in the second example Line().data(df) is a full Layer and then we create a view of of it.

Maybe I'm overthinking this, but Layer seems to be overloaded? Though to be fair, in the first example, Line and Rect do end up being full layers. So maybe I just think it's confusing that a Layer can be a Geom when it has no data, or a DataLayer when it has no chart builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions