Module:Lua test: Difference between revisions
Jump to navigation
Jump to search
Created page with "local p = {} -- p stands for package function p.hello( frame ) return "Hello, world!" end return p" |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p.hello( frame ) | function p.hello(frame) | ||
return | return frame:preprocess( '{{#widget:Chartjs_bar|title = Test Predicted world population (millions) in 2050|data_labels = Africa, Asia, Europe, Latin America, North America|data_series = ' .. math.random(300, 5000) .. ',' .. math.random(30, 500) .. ',' .. math.random(300, 5000) .. ',' .. math.random(300, 5000) .. ',' .. math.random(300, 5000) .. '|data_identifier = Population (millions)|colors = #3e95cd, #8e5ea2, #3cba9f, #e8c3b9, #c45850|legend = yes/no <!-- default: yes -->|orientation = vertical/horizontal <!-- default: vertical -->}}' ) | ||
end | end | ||
return p | return p | ||
Latest revision as of 21:11, 6 May 2024
Lua test documentation
local p = {}
function p.hello(frame)
return frame:preprocess( '{{#widget:Chartjs_bar|title = Test Predicted world population (millions) in 2050|data_labels = Africa, Asia, Europe, Latin America, North America|data_series = ' .. math.random(300, 5000) .. ',' .. math.random(30, 500) .. ',' .. math.random(300, 5000) .. ',' .. math.random(300, 5000) .. ',' .. math.random(300, 5000) .. '|data_identifier = Population (millions)|colors = #3e95cd, #8e5ea2, #3cba9f, #e8c3b9, #c45850|legend = yes/no <!-- default: yes -->|orientation = vertical/horizontal <!-- default: vertical -->}}' )
end
return p