Skip to content

You must be logged in to vote

As @Fil said, you need to make the stack transform explicit if you are using it with the tip mark; the area mark applies it implicitly, but the tip mark does not. But there’s no reason to use the tip mark explicitly here when you can use the tip option instead, and then you can continue to benefit from the implicit stack transform provided by the area mark. That looks like this:

Plot.plot({
  marginLeft: 50,
  y: {
    grid: true,
    label: "Unemployed (thousands)"
  },
  marks: [
    Plot.areaY(unemployment, {x: "date", y: "unemployed", fill: "industry", tip: true}),
    Plot.ruleY([0])
  ]
})

I also removed the “↑” from the label since the arrow is applied implicitly by the axis (thou…

Replies: 2 comments 9 replies

You must be logged in to vote
5 replies
@Hvass-Labs

@Fil

Fil Dec 18, 2023
Collaborator

@Hvass-Labs

@Hvass-Labs

@Fil

Fil Dec 27, 2023
Collaborator

You must be logged in to vote
4 replies
@Hvass-Labs

@Hvass-Labs

@mbostock

@Hvass-Labs

Answer selected by Hvass-Labs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1950 on December 18, 2023 12:08.