มอดูล:Graph:Chart

จากวิกิพีเดีย สารานุกรมเสรี
Documentation icon คู่มือการใช้งานมอดูล[สร้าง]
local p = {}
local graph = require('มอดูล:Graph')

p[''] = function(frame)
	local newFrame = {
	    getParent = function(self)
	    	return frame
	    end,
	    getTitle = function(self)
	    	return 'แม่แบบ:Graph:Chart'
	    end,
	    args = {}
	}
	setmetatable(newFrame, {
		__index = function(t, k)
			if type(frame[k]) == 'function' then
				return function(...)
					return frame[k](frame, select(2, ...))
				end
			else
				return frame[k]
			end
		end
	})
	return frame:extensionTag{ name='templatestyles', args={src='Template:Graph:Chart/styles.css'} },
		frame:extensionTag('graph', graph.chartWrapper(newFrame))
end

return p