Test Wikimedia Commons
testcommonswiki
https://test-commons.wikimedia.org/wiki/Main_Page
MediaWiki 1.45.0-wmf.5
first-letter
Media
Special
Talk
User
User talk
Commons
Commons talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Creator
Creator talk
TimedText
TimedText talk
Sequence
Sequence talk
Institution
Institution talk
Data
Data talk
TimedText
TimedText talk
Module
Module talk
Translations
Translations talk
Data:1993 Canadian federal election.chart
486
2415
5016
4980
2025-06-13T00:57:50Z
Brooke Vibber (WMF)
1355
5016
Chart.JsonConfig
application/json
{"license":"CC0-1.0","version":1,"type":"bar","xAxis":{"title":{"en":"Days of the week","fr":"Les jours de semaine"}},"yAxis":{"title":{"en":"%support","fr":"%soutien"}},"legend":{"en":"Party","fr":"Parti"},"source":"1993 Canadian federal election.tab","title":{"en":"1993 Canadian federal election"}}
l5ur84w1t5i8i0huz1a1cpb20167c0u
Module:TabUtils
828
2434
5012
5010
2025-06-12T23:12:41Z
Brooke Vibber (WMF)
1355
change equals to eq, clean up a little
5012
Scribunto
text/plain
--
-- Experimental tabular data utilities for Chart transforms
-- See https://www.mediawiki.org/wiki/Extension:Chart/Transforms
--
local p = {}
--
-- build a map of column names -> indexes
-- @internal
--
function colmap( tab )
local cols = {}
for i, field in ipairs( tab.schema.fields ) do
cols[field.name] = i
end
return cols
end
--
-- select: subset a data set by column reference or comparison on row values
--
-- Arguments:
-- * cols: comma-separated list of column names to keep, otherwise returns all cols
-- * where: column name to match on, otherwise returns all rows
-- * eq, ne, gt, lt, gte, lte: value to compare against to keep rows
--
function p.select( tab, args )
local map = colmap( tab )
local where = nil
if args.where then
local index = map[args.where]
local field = tab.schema.fields[index]
local function convert( val )
if field.type == "number" then
return tonumber( val )
elseif field.type == "localized" then
error( "todo: support localized fields" )
else
return val
end
end
local comparator
if args.eq then
local against = convert( args.eq )
comparator = function ( val )
return val == against
end
elseif args.ne then
local against = convert( args.ne )
comparator = function ( val )
return val ~= against
end
elseif args.gt then
local against = convert( args.gt )
comparator = function ( val )
return val > against
end
elseif args.lt then
local against = convert( args.lt )
comparator = function ( val )
return val < against
end
elseif args.gte then
local against = convert( args.gte )
comparator = function ( val )
return val >= against
end
elseif args.lte then
local against = convert( args.lte )
comparator = function ( val )
return val <= against
end
else
error( "'where' must provide argument for 'eq', 'ne', 'gt', 'lt', 'gte', or 'lte'" )
end
local newdata = {}
for _, row in ipairs( tab.data ) do
if comparator( row[index] ) then
table.insert( newdata, row )
end
end
tab.data = newdata
end
if args.cols then
local cols = mw.text.split( args.cols, ",", true )
local newfields = {}
local newdata = {}
for i, name in ipairs( cols ) do
table.insert( newfields, tab.schema.fields[map[name]] )
end
for n, row in ipairs( tab.data ) do
local newrow = {}
for i, name in ipairs( cols ) do
table.insert( newrow, row[map[name]] )
end
table.insert( newdata, newrow )
end
tab.schema.fields = newfields
tab.data = newdata
end
return tab
end
--
-- Convenience function for testing/debugging, run from console
-- while editing this module.
--
function p.demo()
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["where"] = "high",
["lt"] = "25"
}))
end
return p
26ougvhskf9zgvle8lw4rhedm0gfk0a
5014
5012
2025-06-12T23:35:32Z
Brooke Vibber (WMF)
1355
add a single-level sort paramter to select (could be extended to multiple levels in future)
5014
Scribunto
text/plain
--
-- Experimental tabular data utilities for Chart transforms
-- See https://www.mediawiki.org/wiki/Extension:Chart/Transforms
--
local p = {}
--
-- build a map of column names -> indexes
-- @internal
--
function colmap( tab )
local cols = {}
for i, field in ipairs( tab.schema.fields ) do
cols[field.name] = i
end
return cols
end
--
-- select: subset a data set by column reference or comparison on row values
--
-- Arguments:
-- * cols: comma-separated list of column names to keep, otherwise returns all cols
-- * where: column name to match on, otherwise returns all rows
-- * eq, ne, gt, lt, gte, lte: value to compare against to keep rows
-- * sort: column name to sort on
-- * order: sort order "asc" or "desc", defaults to "asc"
--
function p.select( tab, args )
local map = colmap( tab )
local where = nil
if args.where then
local index = map[args.where]
local field = tab.schema.fields[index]
local function convert( val )
if field.type == "number" then
return tonumber( val )
elseif field.type == "localized" then
error( "todo: support localized fields" )
else
return val
end
end
local comparator
if args.eq then
local against = convert( args.eq )
comparator = function ( val )
return val == against
end
elseif args.ne then
local against = convert( args.ne )
comparator = function ( val )
return val ~= against
end
elseif args.gt then
local against = convert( args.gt )
comparator = function ( val )
return val > against
end
elseif args.lt then
local against = convert( args.lt )
comparator = function ( val )
return val < against
end
elseif args.gte then
local against = convert( args.gte )
comparator = function ( val )
return val >= against
end
elseif args.lte then
local against = convert( args.lte )
comparator = function ( val )
return val <= against
end
else
error( "'where' must provide argument for 'eq', 'ne', 'gt', 'lt', 'gte', or 'lte'" )
end
local newdata = {}
for _, row in ipairs( tab.data ) do
if comparator( row[index] ) then
table.insert( newdata, row )
end
end
tab.data = newdata
end
if args.cols then
local cols = mw.text.split( args.cols, ",", true )
local newfields = {}
local newdata = {}
for i, name in ipairs( cols ) do
table.insert( newfields, tab.schema.fields[map[name]] )
end
for n, row in ipairs( tab.data ) do
local newrow = {}
for i, name in ipairs( cols ) do
table.insert( newrow, row[map[name]] )
end
table.insert( newdata, newrow )
end
tab.schema.fields = newfields
tab.data = newdata
map = colmap( tab )
end
if args.sort then
local index = map[args.sort]
if not index then
error("Missing sort column: " .. args.sort)
end
local comparator
if args.order == "desc" then
comparator = function ( a, b )
return a[index] > b[index]
end
elseif args.order == "asc" or not args.order then
comparator = function ( a, b )
return a[index] < b[index]
end
else
error("Invalid sort order: " .. args.order)
end
table.sort( tab.data, comparator )
end
return tab
end
--
-- Convenience function for testing/debugging, run from console
-- while editing this module.
--
function p.demo()
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["where"] = "high",
["lt"] = "25"
}))
end
function p.demoSort(order)
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["sort"] = "high",
["order"] = order
}))
end
return p
e3ovongsggos8srrobk73bp6j0syrbf
5015
5014
2025-06-13T00:55:46Z
Brooke Vibber (WMF)
1355
Add 'inline' function to just straight up drop in a blob of JSON
5015
Scribunto
text/plain
--
-- Experimental tabular data utilities for Chart transforms
-- See https://www.mediawiki.org/wiki/Extension:Chart/Transforms
--
local p = {}
--
-- build a map of column names -> indexes
-- @internal
--
function colmap( tab )
local cols = {}
for i, field in ipairs( tab.schema.fields ) do
cols[field.name] = i
end
return cols
end
--
-- select: subset a data set by column reference or comparison on row values
--
-- Arguments:
-- * cols: comma-separated list of column names to keep, otherwise returns all cols
-- * where: column name to match on, otherwise returns all rows
-- * eq, ne, gt, lt, gte, lte: value to compare against to keep rows
-- * sort: column name to sort on
-- * order: sort order "asc" or "desc", defaults to "asc"
--
function p.select( tab, args )
local map = colmap( tab )
local where = nil
if args.where then
local index = map[args.where]
local field = tab.schema.fields[index]
local function convert( val )
if field.type == "number" then
return tonumber( val )
elseif field.type == "localized" then
error( "todo: support localized fields" )
else
return val
end
end
local comparator
if args.eq then
local against = convert( args.eq )
comparator = function ( val )
return val == against
end
elseif args.ne then
local against = convert( args.ne )
comparator = function ( val )
return val ~= against
end
elseif args.gt then
local against = convert( args.gt )
comparator = function ( val )
return val > against
end
elseif args.lt then
local against = convert( args.lt )
comparator = function ( val )
return val < against
end
elseif args.gte then
local against = convert( args.gte )
comparator = function ( val )
return val >= against
end
elseif args.lte then
local against = convert( args.lte )
comparator = function ( val )
return val <= against
end
else
error( "'where' must provide argument for 'eq', 'ne', 'gt', 'lt', 'gte', or 'lte'" )
end
local newdata = {}
for _, row in ipairs( tab.data ) do
if comparator( row[index] ) then
table.insert( newdata, row )
end
end
tab.data = newdata
end
if args.cols then
local cols = mw.text.split( args.cols, ",", true )
local newfields = {}
local newdata = {}
for i, name in ipairs( cols ) do
table.insert( newfields, tab.schema.fields[map[name]] )
end
for n, row in ipairs( tab.data ) do
local newrow = {}
for i, name in ipairs( cols ) do
table.insert( newrow, row[map[name]] )
end
table.insert( newdata, newrow )
end
tab.schema.fields = newfields
tab.data = newdata
map = colmap( tab )
end
if args.sort then
local index = map[args.sort]
if not index then
error("Missing sort column: " .. args.sort)
end
local comparator
if args.order == "desc" then
comparator = function ( a, b )
return a[index] > b[index]
end
elseif args.order == "asc" or not args.order then
comparator = function ( a, b )
return a[index] < b[index]
end
else
error("Invalid sort order: " .. args.order)
end
table.sort( tab.data, comparator )
end
return tab
end
--
-- inline: replace the data set with the given JSON object
--
-- Arguments
-- * json: a JSON string representing a valid tabular data set
--
function p.inline( tab, args )
if args.json then
return mw.text.jsonDecode( args.json )
end
error("must provide one argument of: json")
end
--
-- Convenience function for testing/debugging, run from console
-- while editing this module.
--
function p.demo()
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["where"] = "high",
["lt"] = "25"
} ) )
end
function p.demoSort(order)
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["sort"] = "high",
["order"] = order
} ) )
end
function p.demoInline(json)
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.inline( tab, {
["json"] = json
} ) )
end
return p
rrlsakjqmhz5vjjb7rpmxin4rgpeehb
5019
5015
2025-06-13T01:07:00Z
Brooke Vibber (WMF)
1355
5019
Scribunto
text/plain
--
-- Experimental tabular data utilities for Chart transforms
-- See https://www.mediawiki.org/wiki/Extension:Chart/Transforms
--
local p = {}
--
-- build a map of column names -> indexes
-- @internal
--
function colmap( tab )
local cols = {}
for i, field in ipairs( tab.schema.fields ) do
cols[field.name] = i
end
return cols
end
--
-- select: subset a data set by column reference or comparison on row values
--
-- Arguments:
-- * cols: comma-separated list of column names to keep, otherwise returns all cols
-- * where: column name to match on, otherwise returns all rows
-- * eq, ne, gt, lt, gte, lte: value to compare against to keep rows
-- * sort: column name to sort on
-- * order: sort order "asc" or "desc", defaults to "asc"
--
function p.select( tab, args )
local map = colmap( tab )
local where = nil
if args.where then
local index = map[args.where]
local field = tab.schema.fields[index]
local function convert( val )
if field.type == "number" then
return tonumber( val )
elseif field.type == "localized" then
error( "todo: support localized fields" )
else
return val
end
end
local comparator
if args.eq then
local against = convert( args.eq )
comparator = function ( val )
return val == against
end
elseif args.ne then
local against = convert( args.ne )
comparator = function ( val )
return val ~= against
end
elseif args.gt then
local against = convert( args.gt )
comparator = function ( val )
return val > against
end
elseif args.lt then
local against = convert( args.lt )
comparator = function ( val )
return val < against
end
elseif args.gte then
local against = convert( args.gte )
comparator = function ( val )
return val >= against
end
elseif args.lte then
local against = convert( args.lte )
comparator = function ( val )
return val <= against
end
else
error( "'where' must provide argument for 'eq', 'ne', 'gt', 'lt', 'gte', or 'lte'" )
end
local newdata = {}
for _, row in ipairs( tab.data ) do
if comparator( row[index] ) then
table.insert( newdata, row )
end
end
tab.data = newdata
end
if args.cols then
local cols = mw.text.split( args.cols, ",", true )
local newfields = {}
local newdata = {}
for i, name in ipairs( cols ) do
table.insert( newfields, tab.schema.fields[map[name]] )
end
for n, row in ipairs( tab.data ) do
local newrow = {}
for i, name in ipairs( cols ) do
table.insert( newrow, row[map[name]] )
end
table.insert( newdata, newrow )
end
tab.schema.fields = newfields
tab.data = newdata
map = colmap( tab )
end
if args.sort then
local index = map[args.sort]
if not index then
error("Missing sort column: " .. args.sort)
end
local comparator
if args.order == "desc" then
comparator = function ( a, b )
return a[index] > b[index]
end
elseif args.order == "asc" or not args.order then
comparator = function ( a, b )
return a[index] < b[index]
end
else
error("Invalid sort order: " .. args.order)
end
table.sort( tab.data, comparator )
end
return tab
end
--
-- inline: replace the data set with the given JSON object
--
-- Arguments
-- * json: a JSON string representing a valid tabular data set
--
function p.inline( tab, args )
if args.json then
return mw.text.jsonDecode( args.json )
end
return {
["license"] = "CC0-1.0",
["description"] = {
["en"] = "Must provide json argument"
},
["sources"] = "from wikibase",
["schema"] = {
["fields"] = {},
},
["data"] = {}
}
end
--
-- Convenience function for testing/debugging, run from console
-- while editing this module.
--
function p.demo()
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["where"] = "high",
["lt"] = "25"
} ) )
end
function p.demoSort(order)
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["sort"] = "high",
["order"] = order
} ) )
end
function p.demoInline(json)
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.inline( tab, {
["json"] = json
} ) )
end
return p
sy357z1a0oxxgcqozp9dbyr95ajsvyx
5024
5019
2025-06-13T01:45:29Z
Brooke Vibber (WMF)
1355
5024
Scribunto
text/plain
--
-- Experimental tabular data utilities for Chart transforms
-- See https://www.mediawiki.org/wiki/Extension:Chart/Transforms
--
local p = {}
--
-- build a map of column names -> indexes
-- @internal
--
function colmap( tab )
local cols = {}
for i, field in ipairs( tab.schema.fields ) do
cols[field.name] = i
end
return cols
end
--
-- select: subset a data set by column reference or comparison on row values
--
-- Arguments:
-- * cols: comma-separated list of column names to keep, otherwise returns all cols
-- * where: column name to match on, otherwise returns all rows
-- * eq, ne, gt, lt, gte, lte: value to compare against to keep rows
-- * sort: column name to sort on
-- * order: sort order "asc" or "desc", defaults to "asc"
--
function p.select( tab, args )
local map = colmap( tab )
local where = nil
if args.where then
local index = map[args.where]
local field = tab.schema.fields[index]
local function convert( val )
if field.type == "number" then
return tonumber( val )
elseif field.type == "localized" then
error( "todo: support localized fields" )
else
return val
end
end
local comparator
if args.eq then
local against = convert( args.eq )
comparator = function ( val )
return val == against
end
elseif args.ne then
local against = convert( args.ne )
comparator = function ( val )
return val ~= against
end
elseif args.gt then
local against = convert( args.gt )
comparator = function ( val )
return val > against
end
elseif args.lt then
local against = convert( args.lt )
comparator = function ( val )
return val < against
end
elseif args.gte then
local against = convert( args.gte )
comparator = function ( val )
return val >= against
end
elseif args.lte then
local against = convert( args.lte )
comparator = function ( val )
return val <= against
end
else
error( "'where' must provide argument for 'eq', 'ne', 'gt', 'lt', 'gte', or 'lte'" )
end
local newdata = {}
for _, row in ipairs( tab.data ) do
if comparator( row[index] ) then
table.insert( newdata, row )
end
end
tab.data = newdata
end
if args.cols then
local cols = mw.text.split( args.cols, ",", true )
local newfields = {}
local newdata = {}
for i, name in ipairs( cols ) do
table.insert( newfields, tab.schema.fields[map[name]] )
end
for n, row in ipairs( tab.data ) do
local newrow = {}
for i, name in ipairs( cols ) do
table.insert( newrow, row[map[name]] )
end
table.insert( newdata, newrow )
end
tab.schema.fields = newfields
tab.data = newdata
map = colmap( tab )
end
if args.sort then
local index = map[args.sort]
if not index then
error("Missing sort column: " .. args.sort)
end
local comparator
if args.order == "desc" then
comparator = function ( a, b )
return a[index] > b[index]
end
elseif args.order == "asc" or not args.order then
comparator = function ( a, b )
return a[index] < b[index]
end
else
error("Invalid sort order: " .. args.order)
end
table.sort( tab.data, comparator )
end
return tab
end
--
-- inline: replace the data set with the given JSON object
--
-- Arguments:
-- * json: a JSON string representing a valid tabular data set
--
-- Ideas for expansion:
-- * inline CSV decoder
--
function p.inline( tab, args )
if args.json then
return mw.text.jsonDecode( args.json )
end
return {
["license"] = "CC0-1.0",
["description"] = {
["en"] = "Must provide json argument"
},
["sources"] = "from wikibase",
["schema"] = {
["fields"] = {},
},
["data"] = {}
}
end
--
-- Convenience function for testing/debugging, run from console
-- while editing this module.
--
function p.demo()
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["where"] = "high",
["lt"] = "25"
} ) )
end
function p.demoSort(order)
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.select( tab, {
["cols"] = "month,high",
["sort"] = "high",
["order"] = order
} ) )
end
function p.demoInline(json)
local tab = mw.ext.data.get( "Sample_weekly_temperature_dataset.tab", "_" )
mw.logObject( p.inline( tab, {
["json"] = json
} ) )
end
return p
e4o1smx8hezkp1oy768vmm1phft7yl7
User:Brooke Vibber (WMF)/test
2
2435
5013
2025-06-12T23:15:24Z
Brooke Vibber (WMF)
1355
Created page with "{{#chart:Weekly average temperatures (F).chart|arg:units=C}}"
5013
wikitext
text/x-wiki
{{#chart:Weekly average temperatures (F).chart|arg:units=C}}
oy0hstkssjkhrbl61frahkb8ylwe7ou
Data:Inline data test chart.chart
486
2436
5017
2025-06-13T01:00:54Z
Brooke Vibber (WMF)
1355
Created page with "{ "license": "CC0-1.0", "version": 1, "type": "bar", "xAxis": { "title": { "en": "Days of the week", "fr": "Les jours de semaine" } }, "yAxis": { "title": { "en": "%support", "fr": "%soutien" } }, "legend": { "en": "Party", "fr": "Parti" }, "source": "1993 Canadian federal election.tab", "title": { "en": "1993 Canadian federa..."
5017
Chart.JsonConfig
application/json
{"license":"CC0-1.0","version":1,"type":"bar","xAxis":{"title":{"en":"Days of the week","fr":"Les jours de semaine"}},"yAxis":{"title":{"en":"%support","fr":"%soutien"}},"legend":{"en":"Party","fr":"Parti"},"source":"1993 Canadian federal election.tab","title":{"en":"1993 Canadian federal election"}}
l5ur84w1t5i8i0huz1a1cpb20167c0u
5018
5017
2025-06-13T01:01:55Z
Brooke Vibber (WMF)
1355
5018
Chart.JsonConfig
application/json
{"license":"CC0-1.0","version":1,"type":"bar","xAxis":{"title":{"en":"Days of the week","fr":"Les jours de semaine"}},"yAxis":{"title":{"en":"%support","fr":"%soutien"}},"legend":{"en":"Party","fr":"Parti"},"transform":{"module":"TabUtils","function":"select","args":{}},"source":"1993 Canadian federal election.tab","title":{"en":"1993 Canadian federal election"}}
iq3uy6r4ekif7c7oseh77020jaco8mz
5020
5018
2025-06-13T01:07:14Z
Brooke Vibber (WMF)
1355
5020
Chart.JsonConfig
application/json
{"license":"CC0-1.0","version":1,"type":"bar","xAxis":{"title":{"en":"Days of the week","fr":"Les jours de semaine"}},"yAxis":{"title":{"en":"%support","fr":"%soutien"}},"legend":{"en":"Party","fr":"Parti"},"transform":{"module":"TabUtils","function":"inline","args":{}},"source":"1993 Canadian federal election.tab","title":{"en":"1993 Canadian federal election"}}
icdok5djkmukb33hncia4jvtj4rim1r
5022
5020
2025-06-13T01:10:42Z
Brooke Vibber (WMF)
1355
use a skeleton
5022
Chart.JsonConfig
application/json
{"license":"CC0-1.0","version":1,"type":"bar","xAxis":{"title":{"en":"Days of the week","fr":"Les jours de semaine"}},"yAxis":{"title":{"en":"%support","fr":"%soutien"}},"legend":{"en":"Party","fr":"Parti"},"transform":{"module":"TabUtils","function":"inline","args":{}},"source":"Charts/Wikibase property/test-skeleton.tab","title":{"en":"1993 Canadian federal election"}}
tw2x2c54nbb9jvs8qhhxce3tddtv2ri
User:Brooke Vibber (WMF)/Inline test
2
2437
5021
2025-06-13T01:08:28Z
Brooke Vibber (WMF)
1355
Created page with "{{#chart:Inline data test chart.chart|arg:json= { "license": "CC0-1.0", "description": { "en": "Favorite pizza toppings!" }, "schema": { "fields": [ { "name": "date", "type": "string", "title": { "en": "Date", "fr": "Date" } }, { "name": "pc", "type": "number",..."
5021
wikitext
text/x-wiki
{{#chart:Inline data test chart.chart|arg:json=
{
"license": "CC0-1.0",
"description": {
"en": "Favorite pizza toppings!"
},
"schema": {
"fields": [
{
"name": "date",
"type": "string",
"title": {
"en": "Date",
"fr": "Date"
}
},
{
"name": "pc",
"type": "number",
"title": {
"en": "PC",
"fr": "PC"
}
},
{
"name": "liberal",
"type": "number",
"title": {
"en": "Liberal",
"fr": "Libéral"
}
},
{
"name": "ndp",
"type": "number",
"title": {
"en": "NDP",
"fr": "NPD"
}
},
{
"name": "bq",
"type": "number",
"title": {
"en": "BQ",
"fr": "BQ"
}
},
{
"name": "reform",
"type": "number",
"title": {
"en": "Reform",
"fr": "Réform"
}
}
]
},
"data": [
[
"1993-09-09",
35,
37,
8,
8,
10
],
[
"1993-09-14",
36,
33,
8,
10,
11
],
[
"1993-09-20",
35,
35,
6,
11,
11
],
[
"1993-09-25",
30,
37,
8,
10,
13
],
[
"1993-09-26",
31,
36,
7,
11,
13
],
[
"1993-09-26",
28,
34,
7,
12,
15
],
[
"1993-09-30",
25,
39,
6,
12,
17
],
[
"1993-10-02",
26,
38,
8,
12,
14
],
[
"1993-10-08",
22,
37,
8,
12,
18
],
[
"1993-10-16",
22,
40,
7,
13,
16
],
[
"1993-10-19",
21,
39,
6,
14,
17
],
[
"1993-10-22",
18,
43,
7,
14,
18
],
[
"1993-10-22",
16,
44,
7,
12,
19
],
[
"1993-10-25",
16.04,
41.24,
6.88,
13.52,
18.69
]
]
}
}}
0rc5i2mq15oh4205wjjnckp6k241bzi
5023
5021
2025-06-13T01:11:35Z
Brooke Vibber (WMF)
1355
5023
wikitext
text/x-wiki
This page implements inline data on the parser function in the brute-forcest way by having a function in [[Module:TabUtils]] that decodes a JSON string and returns it in-place
{{#chart:Inline data test chart.chart|arg:json=
{
"license": "CC0-1.0",
"description": {
"en": "Favorite pizza toppings!"
},
"schema": {
"fields": [
{
"name": "date",
"type": "string",
"title": {
"en": "Date",
"fr": "Date"
}
},
{
"name": "pc",
"type": "number",
"title": {
"en": "PC",
"fr": "PC"
}
},
{
"name": "liberal",
"type": "number",
"title": {
"en": "Liberal",
"fr": "Libéral"
}
},
{
"name": "ndp",
"type": "number",
"title": {
"en": "NDP",
"fr": "NPD"
}
},
{
"name": "bq",
"type": "number",
"title": {
"en": "BQ",
"fr": "BQ"
}
},
{
"name": "reform",
"type": "number",
"title": {
"en": "Reform",
"fr": "Réform"
}
}
]
},
"data": [
[
"1993-09-09",
35,
37,
8,
8,
10
],
[
"1993-09-14",
36,
33,
8,
10,
11
],
[
"1993-09-20",
35,
35,
6,
11,
11
],
[
"1993-09-25",
30,
37,
8,
10,
13
],
[
"1993-09-26",
31,
36,
7,
11,
13
],
[
"1993-09-26",
28,
34,
7,
12,
15
],
[
"1993-09-30",
25,
39,
6,
12,
17
],
[
"1993-10-02",
26,
38,
8,
12,
14
],
[
"1993-10-08",
22,
37,
8,
12,
18
],
[
"1993-10-16",
22,
40,
7,
13,
16
],
[
"1993-10-19",
21,
39,
6,
14,
17
],
[
"1993-10-22",
18,
43,
7,
14,
18
],
[
"1993-10-22",
16,
44,
7,
12,
19
],
[
"1993-10-25",
16.04,
41.24,
6.88,
13.52,
18.69
]
]
}
}}
0o93qhu035ysakh6g7q62mwbtz65zd6