tidyverse / tidyverse/ggplot2

Feature request: `position_stack()` alignment

Open
#6,555 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature positions :1st_place_medal:
Dominant language
R
Stars
7k
Forks
2.1k
Avg merge
59m
Merged PRs (30d)
2

Description

Currently, position_stack() bottom-aligns (positive) data at 0.
However, it may be nice to also include options to center-align stacks, like stream graphs, or maybe even top-align stacks.
The thing that worries me is how to deal with negative values in these alternative configurations.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the position_stack() implementation and how it currently bottom-aligns positive values at 0. Define the intended center- and top-alignment behavior, including how negative values should be handled; the work is done when those semantics are agreed and the feature is implemented with coverage for the relevant value cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.