Module:Lua test: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p.hello(frame) | 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( | 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