Topic on User talk:Yurik/Flow Archive 1

"Please upgrade to Vega 2.0"

8
AKlapper (WMF) (talkcontribs)

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.

Yurik (talkcontribs)
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.
AKlapper (WMF) (talkcontribs)
Yurik (talkcontribs)

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?

AKlapper (WMF) (talkcontribs)

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.

Yurik (talkcontribs)

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.

Yurik (talkcontribs)

Upgraded Community metrics to use GraphChart for everything except the line graph - that one was slightly more complex, pending GraphChart code update.

AKlapper (WMF) (talkcontribs)

Oh whou. Thank you a lot, Yurik!

Reply to ""Please upgrade to Vega 2.0""