Module talk:Tabular data: Difference between revisions

Content deleted Content added
Line 38:
 
Just an idea, not sure about the technical feasibility. Similar to getting cell value, is it possible to get the column values or row values? Output shall be csv(or some delimited values) in place of a value. One of the usage I'm looking for is to use in {{tl|Graph:Chart}} as data series.- [[User:Timbaaa|Timbaaa]] -> <small>[[User talk:Timbaaa|ping me]]</small> 13:31, 14 July 2020 (UTC)
 
:{{ping|Timbaaa}} That's definitely feasible, though it might be easier to integrate something with {{tl|Graph:Lines}}, which is already pretty usable with tabular data, as seen in [[COVID-19 pandemic in the San Francisco Bay Area#Cases by county over time]]. It would look pretty similar to the existing <code>_wikitable()</code> function, but just the part that collects the <code>title</code>s of the elements in <code>data.schema.fields</code>. If you're planning to use this functionality inside a module instead of directly inside a template or article, I'd suggest working with <code>mw.ext.data.get(…).schema.fields</code> directly so you have maximum control over formatting. &ndash;&nbsp;[[User:Mxn|Minh <span style="font-variant: small-caps;">Nguyễn</span>]]&nbsp;<sup>[[User talk:Mxn|<span style="display: inline-block;">&#x1f4ac;</span>]]</sup> 19:46, 19 September 2020 (UTC)