Skip to content

Default area fill is broken #2410

@mbostock

Description

@mbostock

It looks like #2329 regressed the default behavior shown in the area mark documentation. It’s supposed to look like this:

Image
Plot.plot({
  marks: [
    Plot.areaY(industries, {x: "date", y2: "unemployed", z: "industry", fillOpacity: 0.1}),
    Plot.lineY(industries, {x: "date", y: "unemployed", z: "industry", strokeWidth: 1})
  ]
})

But it currently looks like this:

Image

Even setting the fill explicitly doesn’t fix the issue! But setting y1: 0 does fix the issue, so it’s probably an unintentional change in the default for y1. We should add a test for this, naturally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions