Feature summary:
Add Extension:Chart support for setting a fixed aspect ratio, in the .chart definition page and/or in the #chart call, so that height scales proportionally with the container width.
Use case(s):
Currently, when embedding a chart in a wiki page, users can define width (via a container) but have no way to directly set the chart height or enforce a consistent aspect ratio. Height support was removed in T376656, possibly temporarily to enable a minimum viable product. On mobiles or within infoboxes, image galleries, or image frames, charts become overly tall. This disproportionate stretching of the y-axis in diagrams may lead to misleading impressions, as moderate changes appear extreme, exaggerating trends. The excessive height also causes infoboxes to expand undesirably and may exceed small screen limits. The overwhelming charts dominate the articles, as they appear much larger than other Wikipedia diagrams. Because of this, they are often placed at the bottom of the article instead of in its context.
Also: Hopefully, Wikipedia users will soon be able to click charts to view full-screen versions on Commons. A timeline for the return of temporarily removed Apache ECharts features—such as setting the axis min value to 0 (the plot origin) to reduce slope exaggeration further—would also be welcome.
Benefits:
- Prevents accidental visual bias by avoiding exaggerated slopes.
- Improves accessibility by improving reading flow and reducing cognitive load, especially for users with visual processing difficulties or limited statistical literacy.
- Enhances consistency across devices and screen sizes.
- Reduces layout workarounds for galleries, infoboxes, and image frames.
- Addresses a key criticism of Extension:Chart, empowering authors to adopt the data visuals to the content.