Module:Graph:Chart

From Semantic Name Authority Repository Cymru
Revision as of 11:18, 19 January 2023 by Jason.nlw (talk | contribs) (Created page with "local p = {} local graph = require('Module:Graph') p[''] = function(frame) local newFrame = { getParent = function(self) return frame end, getTitle = function(self) return 'Template: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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Graph:Chart/doc

local p = {}
local graph = require('Module:Graph')

p[''] = function(frame)
	local newFrame = {
	    getParent = function(self)
	    	return frame
	    end,
	    getTitle = function(self)
	    	return 'Template: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