local getArgs = require('Module:Arguments').getArgsp = --3function p.main(frame) local args = getArgs(frame,) return p._main(args)end--11function p._main(args) local updated = args['updated'] local size = args['size'] or 500 local vert_interval = args['vert-interval'] or 25 local year_interval = args['year-interval'] or 1
local num_named_args = 1 if args['size'] then num_named_args = num_named_args + 1 end if args['vert-interval'] then num_named_args = num_named_args + 1 end if args['year-interval'] then num_named_args = num_named_args + 1 end
--23 Get number of annotations and items local num_anns = 0--25 Get annotations local note_dates = local note_texts = for i = 1, 5, 1 do if args['note-date' .. i] then num_anns = num_anns + 1 note_dates[i] = args['note-date' .. i] note_texts[i] = args['note-text' .. i] end end num_named_args = num_named_args + 2*num_anns--36 Get items local items = local totals = local num_items = 10 --FIX!!!!!!!!!!-- local num_items = #args - num_named_args for i = 1, num_items, 1 do items[i] = args[i] totals[i] = mw.getCurrentFrame:getParent:expandTemplate end--45 Determine totals local curr_tot = totals[#totals] local max_tot = math.max(unpack(totals))--48 vert_legend = '
' .. '
' .. '\'\'\'Total
Electoral
Votes of
Adoptive
States\'\'\'
' .. '
' time_axis = 'num_args = ' .. table.maxn(args) .. '. ' stripes = 1 vert_axis = 1--56 bars = for i=1, num_items, 1 do bars = bars .. mw.getCurrentFrame:getParent:expandTemplate end
curr_tot_ann = 1 finish_line = 1 opt_anns = 1 census_anns = 1
as_of = mw.getCurrentFrame:getParent:preprocess('') chart = mw.getCurrentFrame:getParent:preprocess('') return chartend
function p.bar(args)end
function p.x_marker(args)end
function p.y_marker(args)end
function p.stripe(args)end
function p.annotation(args)end
function p.percent(args)end
return p