Skip to content

The correct default symbol set is only inferred when fill is a channel, not a constant #1462

Closed
@mbostock

Description

@mbostock

For example, this works fine:

Screenshot 2023-04-17 at 6 40 12 PM

Plot.dotX([
  "circle",
  "cross",
  "diamond",
  "square",
  "star",
  "triangle",
  "wye"
], {fill: () => "currentColor", symbol: (d, i) => i}).plot()

But this does not (because it uses the stroked symbols, even though the dots are filled):

Screenshot 2023-04-17 at 6 40 50 PM

Plot.dotX([
  "circle",
  "cross",
  "diamond",
  "square",
  "star",
  "triangle",
  "wye"
], {fill: "currentColor", symbol: (d, i) => i}).plot()

The dots can be made visible by applying a stroke:

Screenshot 2023-04-17 at 6 41 34 PM

Plot.dotX([
  "circle",
  "cross",
  "diamond",
  "square",
  "star",
  "triangle",
  "wye"
], {fill: "currentColor", stroke: "red", symbol: (d, i) => i}).plot()

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