plotly / plotly/plotly.js

Support control over gaps between outer layers of multicategory axes

Open
#5,080 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Adding additional whitespace padding between outer layers of a multicategory axis can improve the legibility of visualizations in many use cases, particularly when the emphasis is on making comparisons within outer-layer categories or between outer-layer categories (not just across all units).

Should be compatible with #2175.

Original discussion of such a feature:

Indeed, I've been pondering if there's a way to improve that. Certainly showing gridlines for the outer category only would help. Trying to think through an analog of bargap / bargroupgap, ie to give a bigger gap at the outer category boundary... but it seems tough to square that with the ticks & gridlines. Also would probably be a major headache to implement, as the spacing between categories would no longer be constant.

Originally posted by @alexcjohnson in https://github.com/plotly/plotly.js/issues/2799#issuecomment-442243851

Hi is there support for something similar to bargap and bargroupgap with multicategory axes? The goal would be to have a different gaps between bars of an outer category and bars of an inner category. Thanks ! Any other way to achieve this would be helpful :)

Originally posted by @elmadj in https://github.com/plotly/plotly.js/pull/3300#issuecomment-575856796

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 compatibility requirement in #2175 and the linked discussions in #2799 and #3300. Then trace the existing multicategory-axis behavior and the related bargap and bargroupgap options; done means outer-layer gaps can be controlled without breaking ticks, gridlines, or existing spacing behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.