Skip to content

Validation of mapped aesthetics #120

@teunbrand

Description

@teunbrand

This sort of works as intended, in that we see an error for an invalid aesthetic via SETTING.

VISUALISE bill_dep AS x, bill_len AS y FROM ggsql:penguins
  DRAW polygon SETTING linewidth => 20
#> Failed to execute query: Validation error: Layer 1: Invalid setting 'linewidth' for geom 'point'. 
#> Valid settings are: x, y, fill, stroke, size, shape, opacity

But this executes just fine:

VISUALISE bill_dep AS x, bill_len AS y FROM ggsql:penguins
  DRAW point MAPPING bill_len AS linewidth

And indeed uses a thicker line to draw points with higher bill_len, confirming the mapping works. Separately from the concern wether points should have a linewidth aesthetic, I think this at least suggests we should validate the layer mapping as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions