Content deleted Content added
No edit summary |
No edit summary |
||
(17 intermediate revisions by the same user not shown) | |||
Line 6:
end
function p.
local chartfun = require('Module:Graph').chart▼
local pfetch = require('Module:Political party')._fetch
local colors = mw.text.split(args['colors'] or '', '%s*[,]%s*')
local
for k,v in pairs(args) do
if k:find('^y
local digit =
local color = isnotempty(colors[tonumber(digit)]) and colors[tonumber(digit)] or pfetch({v, 'color'})
local pname = isnotempty(args['y' .. digit .. 'Title']) and args['y' .. digit .. 'Title'] or pfetch({v, 'abbrev'})
colors[tonumber(digit)] = color
tracking = tracking .. 'party' .. tonumber(digit) .. ' = ' .. v .. ' and '▼
else
end
end
return targs
for k,v in pairs(frame.args) do▼
▲ end
function p.debug(frame)
res = '<pre>\n{{Graph:Chart\n' .. res .. '}}\n</pre>' .. tracking▼
local args = p._chart_args(frame:getParent().args)
end
res = res .. '}}\n</pre>'
return res
end
function p.
return mw.getCurrentFrame():expandTemplate{
title = 'Graph:Chart',
}
end
function p.mainlua(frame)
frame.args = p._chart_args(frame:getParent().args)
return graphchart[''](frame)
end
|