<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl">
	<id>https://wikitest.nl/index.php?action=history&amp;feed=atom&amp;title=Module%3ADatastaven</id>
	<title>Module:Datastaven - Bewerkingsoverzicht</title>
	<link rel="self" type="application/atom+xml" href="https://wikitest.nl/index.php?action=history&amp;feed=atom&amp;title=Module%3ADatastaven"/>
	<link rel="alternate" type="text/html" href="https://wikitest.nl/index.php?title=Module:Datastaven&amp;action=history"/>
	<updated>2026-05-30T12:11:18Z</updated>
	<subtitle>Bewerkingsoverzicht voor deze pagina op de wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wikitest.nl/index.php?title=Module:Datastaven&amp;diff=76358&amp;oldid=prev</id>
		<title>Colani: 1 versie geïmporteerd</title>
		<link rel="alternate" type="text/html" href="https://wikitest.nl/index.php?title=Module:Datastaven&amp;diff=76358&amp;oldid=prev"/>
		<updated>2024-03-23T16:39:56Z</updated>

		<summary type="html">&lt;p&gt;1 versie geïmporteerd&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nieuwe pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;Module:No globals&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local unpackItem = require(&amp;#039;Module:Item&amp;#039;).unpack&lt;br /&gt;
local _delink = require(&amp;#039;Module:Delink&amp;#039;)._delink&lt;br /&gt;
local _yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local templatestyles = &amp;#039;Module:Datastaven/styles.css&amp;#039;&lt;br /&gt;
local data = {}&lt;br /&gt;
local chartHeight = 180 -- In px&lt;br /&gt;
local extraHeight = 20 -- Extra height per extra tier, in px&lt;br /&gt;
local barWidth = 3 -- In em&lt;br /&gt;
local truncateX = false&lt;br /&gt;
local invertY = false&lt;br /&gt;
local ySuffix = &amp;#039;&amp;#039;&lt;br /&gt;
local colors = {&lt;br /&gt;
	&amp;#039;#999999&amp;#039;, &amp;#039;#eeeeee&amp;#039;, &amp;#039;#95291d&amp;#039;, &amp;#039;#ea6a1a&amp;#039;, &amp;#039;#aabc1e&amp;#039;,&lt;br /&gt;
	&amp;#039;#edf669&amp;#039;, &amp;#039;#3ec9a6&amp;#039;, &amp;#039;#0b6b61&amp;#039;, &amp;#039;#dda0dd&amp;#039;, &amp;#039;#ffe4e1&amp;#039;,&lt;br /&gt;
	&amp;#039;#fff943&amp;#039;, &amp;#039;#eca72c&amp;#039;, &amp;#039;#eee8aa&amp;#039;, &amp;#039;#6bd425&amp;#039;, &amp;#039;#618b25&amp;#039;,&lt;br /&gt;
	&amp;#039;#e99fa8&amp;#039;, &amp;#039;#e36271&amp;#039;, &amp;#039;#db0c23&amp;#039;, &amp;#039;#7197b6&amp;#039;, &amp;#039;#325a8d&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
local noGroupColor = &amp;#039;#999999&amp;#039;&lt;br /&gt;
-- Translations for parameter names&lt;br /&gt;
local w = {&lt;br /&gt;
	type = &amp;#039;type&amp;#039;,&lt;br /&gt;
	rankings = &amp;#039;eindstanden&amp;#039;,&lt;br /&gt;
	customLegend = &amp;#039;aangepasteLegenda&amp;#039;,&lt;br /&gt;
	chartHeight = &amp;#039;grafiekhoogte&amp;#039;,&lt;br /&gt;
	barWidth = &amp;#039;staafbreedte&amp;#039;,&lt;br /&gt;
	groups = &amp;#039;groepen&amp;#039;,&lt;br /&gt;
	note = &amp;#039;opm&amp;#039;,&lt;br /&gt;
	truncateX = &amp;#039;xAfkappen&amp;#039;,&lt;br /&gt;
	invertY = &amp;#039;yOmkeren&amp;#039;,&lt;br /&gt;
	x = &amp;#039;x&amp;#039;,&lt;br /&gt;
	y = &amp;#039;y&amp;#039;,&lt;br /&gt;
	yMax = &amp;#039;yMax&amp;#039;,&lt;br /&gt;
	ySuffix = &amp;#039;ySuffix&amp;#039;,&lt;br /&gt;
	yLabel = &amp;#039;yLabel&amp;#039;,&lt;br /&gt;
	yNote = &amp;#039;yOpm&amp;#039;,&lt;br /&gt;
	group = &amp;#039;groep&amp;#039;,&lt;br /&gt;
	subgroup = &amp;#039;afd&amp;#039;,&lt;br /&gt;
	label = &amp;#039;label&amp;#039;,&lt;br /&gt;
	color = &amp;#039;kleur&amp;#039;,&lt;br /&gt;
	tier = &amp;#039;niveau&amp;#039;,&lt;br /&gt;
	value = &amp;#039;waarde&amp;#039;,&lt;br /&gt;
	domains = &amp;#039;domeinen&amp;#039;,&lt;br /&gt;
	from = &amp;#039;van&amp;#039;,&lt;br /&gt;
	till = &amp;#039;tot&amp;#039;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local function isItem(arg)&lt;br /&gt;
	-- An arg is considered an item if it starts with a pipe character.&lt;br /&gt;
	return string.find(mw.text.trim(arg), &amp;#039;|&amp;#039;, 1, true) == 1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function formatItem(item)&lt;br /&gt;
	-- Aliases&lt;br /&gt;
	item[w.x] = item[w.x] or item[&amp;#039;1&amp;#039;]&lt;br /&gt;
	item[w.y] = item[w.y] or item[&amp;#039;2&amp;#039;]&lt;br /&gt;
	item[w.group] = item[w.group] or item[&amp;#039;3&amp;#039;]&lt;br /&gt;
	item[&amp;#039;1&amp;#039;] = nil&lt;br /&gt;
	item[&amp;#039;2&amp;#039;] = nil&lt;br /&gt;
	item[&amp;#039;3&amp;#039;] = nil&lt;br /&gt;
	&lt;br /&gt;
	item[w.y] = tonumber(item[w.y])&lt;br /&gt;
	item[w.yMax] = tonumber(item[w.yMax])&lt;br /&gt;
	item[w.tier] = tonumber(item[w.tier])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function yesno(value, default)&lt;br /&gt;
	if _yesno(value) ~= nil then return _yesno(value) else return default end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function pick(param, item)&lt;br /&gt;
	-- Picks a parameter from an item or else from it&amp;#039;s group or else from data.&lt;br /&gt;
	local value = item[w[param]]&lt;br /&gt;
				  or item[w.group] and data.groups[item[w.group]][w[param]]&lt;br /&gt;
				  or data[param]&lt;br /&gt;
	&lt;br /&gt;
	if type(value) == &amp;quot;table&amp;quot; then&lt;br /&gt;
		-- Pick the value where x is within the domain.&lt;br /&gt;
		local x = tonumber(item[w.x])&lt;br /&gt;
		local domains = value[w.domains]&lt;br /&gt;
		&lt;br /&gt;
		if x and domains and type(domains) == &amp;quot;table&amp;quot; then&lt;br /&gt;
			for _, h in ipairs(domains) do&lt;br /&gt;
				if h[w.from] or h[w.till] then&lt;br /&gt;
					local from = h[w.from] or 0&lt;br /&gt;
					local till = h[w.till] or 9999&lt;br /&gt;
					if x &amp;gt; from and x &amp;lt;= till then return h[w.value] end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		return value[w.value]&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function minn(table)&lt;br /&gt;
	-- Returns the lowest positive numerical index of the given table, or zero&lt;br /&gt;
	-- if the table has no numerical indices.&lt;br /&gt;
	local minn, k = nil, nil&lt;br /&gt;
	repeat&lt;br /&gt;
		k = next(table, k)&lt;br /&gt;
		if type(k) == &amp;#039;number&amp;#039; then&lt;br /&gt;
			if k == 1 then return 1 end&lt;br /&gt;
			if minn == nil or k &amp;lt; minn then minn = k end&lt;br /&gt;
		end&lt;br /&gt;
	until not k&lt;br /&gt;
	return minn or 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function countTiers(tiers)&lt;br /&gt;
	-- Gives the number of tiers, empty inbetweens included.&lt;br /&gt;
	return table.maxn(tiers) - minn(tiers) + 1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function rankTiers(tiers)&lt;br /&gt;
	-- Ranks the tiers bottom up for convenience, since heights will be calculated&lt;br /&gt;
	-- from the bottom up. Example:&lt;br /&gt;
	--   [2] = true,           [2] = 4,&lt;br /&gt;
	--   [3] = true,    --&amp;gt;    [3] = 3,&lt;br /&gt;
	--   [5] = true,           [5] = 1,&lt;br /&gt;
	local highestTierNumber = table.maxn(tiers)&lt;br /&gt;
	&lt;br /&gt;
	for n, _ in pairs(tiers) do&lt;br /&gt;
		tiers[n] = highestTierNumber - n + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return tiers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function mergeTables(t1, t2)&lt;br /&gt;
	if t1 and t2 then for k, v in pairs(t2) do t1[k] = v end end&lt;br /&gt;
	return t1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function importGroups(basename)&lt;br /&gt;
	if basename == nil or basename == &amp;#039;&amp;#039; then return {} end&lt;br /&gt;
	&lt;br /&gt;
	return require(&amp;#039;Module:Datastaven/Groepen/&amp;#039; .. basename)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function extractData(args)&lt;br /&gt;
	-- Extract all the data we need from the args.&lt;br /&gt;
	data = {&lt;br /&gt;
		barWidth = args[w.barWidth] or barWidth,&lt;br /&gt;
		note = args[w.note],&lt;br /&gt;
		truncateX = yesno(args[w.truncateX], truncateX),&lt;br /&gt;
		invertY = yesno(args[w.invertY], invertY),&lt;br /&gt;
		yMax = args[w.yMax] or 0,&lt;br /&gt;
		ySuffix = args[w.ySuffix] or ySuffix,&lt;br /&gt;
		noGroupColor = args[w.color] or noGroupColor,&lt;br /&gt;
		customLegend = args[w.customLegend],&lt;br /&gt;
		bars = {},&lt;br /&gt;
		groups = {},&lt;br /&gt;
		tiers = {},&lt;br /&gt;
	}&lt;br /&gt;
	-- Import preset groups.&lt;br /&gt;
	local presetGroups = importGroups(args[w.groups])&lt;br /&gt;
	&lt;br /&gt;
	-- Extract from inline groups.&lt;br /&gt;
	for i = 1, 20 do&lt;br /&gt;
		local arg = args[w.group .. i]&lt;br /&gt;
		&lt;br /&gt;
		if arg and isItem(arg) then&lt;br /&gt;
			local group = unpackItem(arg)&lt;br /&gt;
			&lt;br /&gt;
			if group[w.group] then&lt;br /&gt;
				group = mergeTables(presetGroups[group[w.group]] or {}, group)&lt;br /&gt;
				data.groups[group[w.group]] = group -- Add to our groups&lt;br /&gt;
				group[w.label] = group[w.label] or group[w.group]&lt;br /&gt;
				group[w.group] = nil&lt;br /&gt;
				formatItem(group)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Extract from items.&lt;br /&gt;
	for _, arg in ipairs(args) do&lt;br /&gt;
		if isItem(arg) then&lt;br /&gt;
			local bar = unpackItem(arg)&lt;br /&gt;
			formatItem(bar)&lt;br /&gt;
			table.insert(data.bars, bar)&lt;br /&gt;
			&lt;br /&gt;
			if bar[w.y] then&lt;br /&gt;
				data.yMax = math.max(data.yMax, bar[w.y])&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			if bar[w.group] and data.groups[bar[w.group]] == nil then&lt;br /&gt;
				data.groups[bar[w.group]] = presetGroups[bar[w.group]]&lt;br /&gt;
											 or { [w.label] = bar[w.label] or bar[w.group],&lt;br /&gt;
											 	  [w.color] = bar[w.color] }&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			local tier = tonumber(pick(&amp;#039;tier&amp;#039;, bar))&lt;br /&gt;
			if tier then data.tiers[tier] = true end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	data.tiers = rankTiers(data.tiers)&lt;br /&gt;
	data.tiersCount = countTiers(data.tiers)&lt;br /&gt;
	data.chartHeight = args[w.chartHeight] or chartHeight + extraHeight * (data.tiersCount - 1)&lt;br /&gt;
	&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function calculateBarHeight(bar)&lt;br /&gt;
	local y = bar[w.y]&lt;br /&gt;
	local yMax = pick(&amp;#039;yMax&amp;#039;, bar)&lt;br /&gt;
	local tierRank = data.tiers[pick(&amp;#039;tier&amp;#039;, bar)] or 1&lt;br /&gt;
	local h = 0&lt;br /&gt;
	&lt;br /&gt;
	if y then&lt;br /&gt;
		if data.invertY then&lt;br /&gt;
			h = (1 - ((y - 1) / yMax)) * 100		 -- Height % (within it&amp;#039;s tier)&lt;br /&gt;
			if y &amp;gt; yMax then h = 0 end&lt;br /&gt;
		else&lt;br /&gt;
			h = y / yMax * 100&lt;br /&gt;
			if y &amp;gt; yMax then h = 100 end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	h = (h + tierRank * 100 - 100) / data.tiersCount -- Add heights of lower tiers&lt;br /&gt;
	h = math.floor(h * 1000) / 1000					 -- Truncate number&lt;br /&gt;
	return h&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function pickColor(bar)&lt;br /&gt;
	local color = pick(&amp;#039;color&amp;#039;, bar)&lt;br /&gt;
	if color then return color end&lt;br /&gt;
	&lt;br /&gt;
	if bar[w.group] then&lt;br /&gt;
		color = table.remove(colors) or &amp;#039;#fff&amp;#039;&lt;br /&gt;
		data.groups[bar[w.group]][w.color] = color&lt;br /&gt;
	else&lt;br /&gt;
		color = data.noGroupColor&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return color&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function delink(text)&lt;br /&gt;
	-- Removes (wiki)links from a text.&lt;br /&gt;
	if not type(text) == &amp;#039;string&amp;#039; then return text end&lt;br /&gt;
	return _delink({ text, urls = &amp;#039;no&amp;#039;, comments = &amp;#039;no&amp;#039;, whitespace = &amp;#039;no&amp;#039; })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function drawTooltip(bar)&lt;br /&gt;
	local text = mw.html.create()&lt;br /&gt;
	local x = bar[w.x]&lt;br /&gt;
	local y = bar[w.y] and bar[w.y] .. pick(&amp;#039;ySuffix&amp;#039;, bar) or bar[w.yLabel]&lt;br /&gt;
	local yNote = bar[w.yNote]&lt;br /&gt;
	&lt;br /&gt;
	if x and x ~= &amp;#039;&amp;#039; then text:tag(&amp;#039;b&amp;#039;):wikitext(x) end&lt;br /&gt;
	if x and (y or yNote) then text:wikitext(&amp;#039;&amp;amp;ensp;&amp;#039;) end&lt;br /&gt;
	if y then text:wikitext(y) end&lt;br /&gt;
	if y and yNote then text:wikitext(&amp;#039; &amp;#039;) end&lt;br /&gt;
	if yNote then text:wikitext(yNote) end&lt;br /&gt;
	&lt;br /&gt;
	if bar[w.group] or bar[w.label] then&lt;br /&gt;
		if tostring(text) ~= &amp;#039;&amp;#039; then text:tag(&amp;#039;br&amp;#039;) end&lt;br /&gt;
		text:wikitext(delink(pick(&amp;#039;label&amp;#039;, bar)))&lt;br /&gt;
		if bar[w.subgroup] then text:wikitext(&amp;#039; &amp;#039; .. bar[w.subgroup]) end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return mw.html.create()&lt;br /&gt;
		:newline()&lt;br /&gt;
		:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;es-tip&amp;#039;)&lt;br /&gt;
		:node(text)&lt;br /&gt;
		:done()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function drawBars()&lt;br /&gt;
	local bars = mw.html.create()&lt;br /&gt;
	&lt;br /&gt;
	for _, bar in ipairs(data.bars) do&lt;br /&gt;
		local x = bar[w.x]&lt;br /&gt;
		local y = bar[w.yLabel] or bar[w.y]&lt;br /&gt;
		local h = calculateBarHeight(bar) .. &amp;#039;%&amp;#039;&lt;br /&gt;
		local c = pickColor(bar)&lt;br /&gt;
		&lt;br /&gt;
		if x and data.truncateX then x = string.sub(x, -2) end -- Show only the last two digits of the year&lt;br /&gt;
		&lt;br /&gt;
		bars&lt;br /&gt;
			:newline()&lt;br /&gt;
			:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
			:addClass(&amp;#039;es-bar&amp;#039;)&lt;br /&gt;
			:attr(&amp;#039;tabindex&amp;#039;, 0)&lt;br /&gt;
			:attr(&amp;#039;data-x&amp;#039;, x)&lt;br /&gt;
			:attr(&amp;#039;data-y&amp;#039;, y)&lt;br /&gt;
			:css(&amp;#039;height&amp;#039;, h)&lt;br /&gt;
			:css(&amp;#039;background-color&amp;#039;, c)&lt;br /&gt;
			:node(drawTooltip(bar))&lt;br /&gt;
			:newline()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return bars&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function orderItems(item1, item2)&lt;br /&gt;
	-- Order by tier number (asc).&lt;br /&gt;
	local t1 = pick(&amp;#039;tier&amp;#039;, item1) or 1000&lt;br /&gt;
	local t2 = pick(&amp;#039;tier&amp;#039;, item2) or 1000&lt;br /&gt;
	return t1 &amp;lt; t2&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getLegendItems()&lt;br /&gt;
	local legendItems = {}&lt;br /&gt;
	local groups = {}&lt;br /&gt;
	&lt;br /&gt;
	-- Copy data.groups to groups.&lt;br /&gt;
	for k, g in pairs(data.groups) do groups[k] = g end&lt;br /&gt;
	&lt;br /&gt;
	-- Start legendItems with the groups chosen in `customLegend`.&lt;br /&gt;
	if data.customLegend then&lt;br /&gt;
		local codes = mw.text.split(data.customLegend, &amp;quot;%s*,%s*&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
		for _, code in pairs(codes) do&lt;br /&gt;
			table.insert(legendItems, groups[code])&lt;br /&gt;
			groups[code] = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Order the (remaining) groups by tier number, then append to legendItems.&lt;br /&gt;
	local iGroups = {}&lt;br /&gt;
	for _, g in pairs(groups) do table.insert(iGroups, g) end&lt;br /&gt;
	table.sort(iGroups, orderItems)&lt;br /&gt;
	for _, g in ipairs(iGroups) do table.insert(legendItems, g) end&lt;br /&gt;
	&lt;br /&gt;
	return legendItems&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function drawLegend()&lt;br /&gt;
	local groups = getLegendItems()&lt;br /&gt;
	local legend = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;es-legend&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;ul&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	for _, group in pairs(groups) do&lt;br /&gt;
		legend&lt;br /&gt;
			:newline()&lt;br /&gt;
			:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
			:css(&amp;#039;background-color&amp;#039;, pick(&amp;#039;color&amp;#039;, group) or &amp;#039;#fff&amp;#039;)&lt;br /&gt;
			:done()&lt;br /&gt;
			:wikitext(pick(&amp;#039;label&amp;#039;, group))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return legend:done()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function drawChart(args)&lt;br /&gt;
	data = extractData(args)&lt;br /&gt;
	-- return mw.dumpObject(data)&lt;br /&gt;
	&lt;br /&gt;
	if #data.bars == 0 then&lt;br /&gt;
		return &amp;quot;&amp;#039;&amp;#039;Geen data om weer te geven.&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local chart = mw.html.create()&lt;br /&gt;
		:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;es-chart&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;overflow-y&amp;#039;, &amp;#039;hidden&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;ul&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;es-grid&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;width&amp;#039;, data.barWidth * #data.bars .. &amp;#039;em&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;height&amp;#039;, data.chartHeight .. &amp;#039;px&amp;#039;)&lt;br /&gt;
		:node(drawBars())&lt;br /&gt;
		:allDone()&lt;br /&gt;
		&lt;br /&gt;
	if data.note then chart:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;es-note&amp;#039;):wikitext(data.note) end&lt;br /&gt;
	chart:node(drawLegend())&lt;br /&gt;
	&lt;br /&gt;
	return tostring(chart)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	args[1] = args[1] or &amp;#039;&amp;#039; -- Data won&amp;#039;t show when args[1] is absent&lt;br /&gt;
	&lt;br /&gt;
	-- Settings for rankings.&lt;br /&gt;
	if args[w.type] == w.rankings then&lt;br /&gt;
		invertY = true&lt;br /&gt;
		barWidth = 1.4&lt;br /&gt;
		truncateX = true&lt;br /&gt;
		ySuffix = &amp;#039;e&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return frame:extensionTag{ name = &amp;#039;templatestyles&amp;#039;, args = { src = templatestyles } } .. drawChart(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Colani</name></author>
	</entry>
</feed>