Module:Graph: Difference between revisions

From mcr
(Created page with "-- Mollusca [URL="hello world"]; -- Mollusca->X1 local p = {} function p.draw(frame) s = '<graphviz format="png">\n' s = s .. 'digraph dependency_g...")
 
No edit summary
Line 9: Line 9:
function p.draw(frame)
function p.draw(frame)
s = '<graphviz format="png">\n'
s = 'digraph dependency_graph {\n'
s = s .. 'digraph dependency_graph {\n'
s = s .. 'rankdir=LR;\n'
s = s .. 'rankdir=LR;\n'
s = s .. 'node [shape=plaintext,fontname="Arial"];\n'
s = s .. 'node [shape=plaintext,fontname="Arial"];\n'
Line 18: Line 17:
s = s .. '}\n'
s = s .. '}\n'
s = s .. '</graphviz>\n'
return frame:callParserFunction{ name = '#tag', args = { 'graphviz', format='png', s } }
return s
 
end
end


return p
return p

Revision as of 11:35, 24 December 2017

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

--  Mollusca [URL="[[Phab:T107595|hello world]]"];

--  Mollusca->X1



local p = {}

function p.draw(frame)
	
	s = 'digraph dependency_graph {\n'
	s = s .. 'rankdir=LR;\n'
	s = s .. 'node [shape=plaintext,fontname="Arial"];\n'
	
	s = s .. 'A->B\n'
	s = s .. 'A->C\n'
	
	s = s .. '}\n'
	return frame:callParserFunction{ name = '#tag', args = { 'graphviz', format='png', s } }

end

return p