Page MenuHomePhabricator

Interactive charts with identical X-axis have inconsistent widths due to differing Y-axis scales
Open, LowPublicBUG REPORT

Assigned To
None
Authored By
Ayack
Oct 31 2025, 7:16 PM
Referenced Files
F71651790: image (5).png
Feb 2 2026, 9:35 PM
F68921855: image.png
Oct 31 2025, 7:16 PM

Description

Steps to replicate the issue (include links if applicable):

What happens?:

Graphs with identical X-axis configuration display different container widths.
The width appears to be influenced by Y-axis label length or data range:

  • Wider: graphs with longer Y-axis labels (e.g., 0–700 000 000)
  • Narrower: graphs with shorter Y-axis labels (e.g., 0–70 %)

This causes visual misalignment in article layout, breaking consistency in stacked chart presentation.
Issue is reproducible across Wikimedia wikis using the Graph extension and is not limited to a single page or language.

What should have happened instead?:

  • All <graph> elements with identical X-axis specifications should render at consistent full width of the content column, regardless of Y-axis scale or label length.
  • Layout should remain uniform when charts are stacked or compared side-by-side (in supported views).

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

image.png (3,292×2,584 px, 477 KB)

Event Timeline

Ayack renamed this task from Interactive <graph> charts with identical X-axis have inconsistent widths due to differing Y-axis scales to Interactive charts with identical X-axis have inconsistent widths due to differing Y-axis scales.Oct 31 2025, 7:17 PM
Ayack updated the task description. (Show Details)
HSwan-WMF subscribed.

Justin to investigate and propose a solution

realizes weeks later that he forgot to hit submit on this comment...

The left edge of the y-axis label should be left aligned with the left edge of the legend.

image (5).png (3,292×2,584 px, 532 KB)

So this is a bug that someone should fix.

Given that we now know what the intended behaviour is, we can estimate it properly going into next sprint. cc @HSwan-WMF