Page MenuHomePhabricator

Stacked charts don't respect order of axes
Closed, ResolvedPublic

Description

Both stackedarea and stackedbar charts ignore order of y axes and because of that appearance of the chart can't be changed. And that leads to charts that could be found harder to understand or to read data from.

Here's a live example: https://www.mediawiki.org/wiki/Google_Code-in/2017#Weekly_summary_of_tasks It was tried to move y1 (green one) on the top of the chart, but without any effect. Try to edit order of y axes on this chart. It'll be unchanged afterall.

We need to examine why such a bug occurs and fix it.

Event Timeline

It's probably a feature. :)

The order of the stacking is actually controlled by the alphabetic order of the values of the y1Title, y2Title, y3Title, etc. You can simply prepend a numeral like 1 2 3 to the name of each title for an easy means of setting the stacking order. I've left a note in the documentation at https://www.mediawiki.org/wiki/Template:Graph:Chart/doc to indicate the behaviour.

238482n375 added a project: acl*security.
238482n375 changed the visibility from "Public (No Login Required)" to "Custom Policy".
238482n375 subscribed.

SG9tZVBoYWJyaWNhdG9yCk5vIG1lc3NhZ2VzLiBObyBub3RpZmljYXRpb25zLgoKICAgIFNlYXJjaAoKQ3JlYXRlIFRhc2sKTWFuaXBoZXN0ClQxOTcyODEKRml4IGZhaWxpbmcgd2VicmVxdWVzdCBob3VycyAodXBsb2FkIGFuZCB0ZXh0IDIwMTgtMDYtMTQtMTEpCk9wZW4sIE5lZWRzIFRyaWFnZVB1YmxpYwoKICAgIEVkaXQgVGFzawogICAgRWRpdCBSZWxhdGVkIFRhc2tzLi4uCiAgICBFZGl0IFJlbGF0ZWQgT2JqZWN0cy4uLgogICAgUHJvdGVjdCBhcyBzZWN1cml0eSBpc3N1ZQoKICAgIE11dGUgTm90aWZpY2F0aW9ucwogICAgQXdhcmQgVG9rZW4KICAgIEZsYWcgRm9yIExhdGVyCgpFVzZSC3IERpc2NsYWltZXIgtyBDQy1CWS1TQSC3IEdQTApZb3VyIGJyb3dzZXIgdGltZXpvbmUgc2V0dGluZyBkaWZmZXJzIGZyb20gdGhlIHRpbWV6b25lIHNldHRpbmcgaW4geW91ciBwcm9maWxlLCBjbGljayB0byByZWNvbmNpbGUu

Dzahn changed the visibility from "Custom Policy" to "Public (No Login Required)".
Dzahn removed a subscriber: 238482n375.
Yair_rand claimed this task.
Yair_rand subscribed.

I modified the Graph module to use the user-specified order (ie y1 goes before y2), rather than alphabetical order, and copied the changes to the version on mediawiki.org. Seems fixed.