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

Albert221 created this task.Jan 5 2018, 9:52 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 5 2018, 9:52 PM
RexxS added a subscriber: RexxS.Jan 6 2018, 1:19 PM

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 set Security to Software security bug.Jun 15 2018, 8:04 AM
238482n375 added a project: acl*security.
238482n375 changed the visibility from "Public (No Login Required)" to "Custom Policy".
238482n375 added a subscriber: 238482n375.

SG9tZVBoYWJyaWNhdG9yCk5vIG1lc3NhZ2VzLiBObyBub3RpZmljYXRpb25zLgoKICAgIFNlYXJjaAoKQ3JlYXRlIFRhc2sKTWFuaXBoZXN0ClQxOTcyODEKRml4IGZhaWxpbmcgd2VicmVxdWVzdCBob3VycyAodXBsb2FkIGFuZCB0ZXh0IDIwMTgtMDYtMTQtMTEpCk9wZW4sIE5lZWRzIFRyaWFnZVB1YmxpYwoKICAgIEVkaXQgVGFzawogICAgRWRpdCBSZWxhdGVkIFRhc2tzLi4uCiAgICBFZGl0IFJlbGF0ZWQgT2JqZWN0cy4uLgogICAgUHJvdGVjdCBhcyBzZWN1cml0eSBpc3N1ZQoKICAgIE11dGUgTm90aWZpY2F0aW9ucwogICAgQXdhcmQgVG9rZW4KICAgIEZsYWcgRm9yIExhdGVyCgpFVzZSC3IERpc2NsYWltZXIgtyBDQy1CWS1TQSC3IEdQTApZb3VyIGJyb3dzZXIgdGltZXpvbmUgc2V0dGluZyBkaWZmZXJzIGZyb20gdGhlIHRpbWV6b25lIHNldHRpbmcgaW4geW91ciBwcm9maWxlLCBjbGljayB0byByZWNvbmNpbGUu

Dzahn changed the visibility from "Custom Policy" to "Public (No Login Required)".
Dzahn removed a subscriber: 238482n375.
Restricted Application added a project: acl*security. · View Herald TranscriptJun 15 2018, 10:50 AM
Yair_rand closed this task as Resolved.Aug 27 2019, 5:32 AM
Yair_rand claimed this task.
Yair_rand added a subscriber: Yair_rand.

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.