View source for Module:Chart data/doc examples
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- <nowiki>
local p = {}
local chart = require( 'Module:Chart data' )
function p.line()
local plot = chart.newChart{ type = 'line' }
:setDimensions( '10vw', '10vh', 300, 300, true )
:setTitle( 'Line chart' )
:setXLabel( 'x axis label' )
:setYLabel( 'y axis label' )
plot.options.fill = true
for i = 1, 2 do
local set = plot:newDataSet()
set.data = { i^2, (i+1)^2, (i+2)^2, (i+3^2), (i+4)^2 }
set.label = 'Set ' .. i
set.borderDash = {5, 5}
end
local labels = {}
000
1:0
Template used on this page:
Return to Module:Chart data/doc examples.