Hi Yuri, in https://www.mediawiki.org/w/index.php?title=Community_metrics&type=revision&diff=1963416&oldid=1963415 you wrote "Please upgrade to 2.0" without any further information. I found https://github.com/vega/vega/wiki/Upgrading-to-2.0 at some point but setting "version":2 on one single graph only makes all graphs vanish, even those that still have "version":1 set. Hence no idea how to actually test changes.
Topic on User talk:Yurik/Flow Archive 1
Yes, that's the limitation of Vega - we cannot have multiple different vega versions in "preview" mode at the same time. Once saved, they can actually be different because Graphoid renders each individually. I outlined some migration steps here. My recommendation - simply go one graph at a time, and ignore the fact that the older graphs don't show up in the preview. Also, see Graph Guide for some debugging ideas.
I've followed https://github.com/vega/vega/wiki/Upgrading-to-2.0 and used http://vega.github.io/vega-editor/?mode=vega to fix syntax errors. All graphs on mw:Community_metrics were trivial except for one I cannot get to work in Vega v2. Help (edits) welcome on my Sandbox: https://www.mediawiki.org/wiki/User:AKlapper_%28WMF%29/Sandbox#Active_Gerrit_code_review_users_per_month - after sorting out that one I can port them all on the "real" page in one go... Thanks. :-/
I think your "filter" transform is broken for the text labels - if you remove that line, it shows for me, but repeats on every data point. Have you considered using GraphChart for it?
I did not know of GraphChart and I'm lost about all those graph options that seem to be around in Wikimedia and which one to use in which situation. Link welcome which explains when to use which one. (As a simple user I'd like to render a graph without having to read lots of documentation which might miss direct rendered examples for my case, because otherwise I'll just use LibreOffice or Excel and throw a PNG over the wall that noone else can easily update. We probably want to avoid that.) Regarding the filter transform, I guess that some line like "test": "datum.x = Sep2015" or "datum.date = Sep2015" is missing but I have no idea how to do a string comparison by accessing a certain value of the data defined on top.
GraphChart template is a relatively recent addition, made by a dewiki contributor and later copied to a number of other wikis. I find it much easier to use than constructing a Vega syntax myself.
Upgraded Community metrics to use GraphChart for everything except the line graph - that one was slightly more complex, pending GraphChart code update.
Oh whou. Thank you a lot, Yurik!