Module:Graph: Difference between revisions

Content deleted Content added
Undid revision 1141810373 by Frietjes (talk)
This needs to use the parent frame
 
(One intermediate revision by the same user not shown)
Line 1,418:
return mw.uri.encode(mw.text.decode(mw.text.trim(frame.args[1])), 'PATH')
end
 
function p.chartCompatible(frame)
local not_chart_args = {
"colors",
"xAxisMin",
"xAxisMax",
"yAxisMin",
"yAxisMax",
"xAxisAngle",
"xScaleType",
"yScaleType",
"linewidth",
"linewidths",
"showSymbols",
"symbolsShape",
"symbolsNoFill",
"symbolsStroke",
"showValues",
"innerRadius",
"xGrid",
"yGrid",
"annotations"
}
 
local pframe = frame:getParent()
local b = 0
local t = 0
 
for t=1,18,1 do
if pframe.args[not_chart_args[t]] then
break
else
b = b + 1
end
t = t + 1
end
if b == 18 then
if pframe.args["name"] then
return "[[Category:Graphs to Port]]"
else
return "[[Category:Graphs to be ported needing names]]"
end
end
end
 
return p