Module:Chart: Difference between revisions

Content deleted Content added
adding 'chart' class and 1em margin at top
adding 'chart' class to bar charts as well. adjusting margin-top to match paragraphs and images. adding missing semicolon.
Line 174:
analyzeParams()
if #values == 0 then error( "no slices found - can't draw pie chart" ) end
addRes( mw.text.tag( 'div', { class = 'chart', style = string.format( "'margin-top:1em0.5em;max-width:%spx";', radius * 2 ) } ) )
addRes( mw.text.tag( 'div', { style = string.format( 'position:relative;min-width:%spx;min-height:%spx;max-width:%spx;overflow:hidden;', radius * 2, radius * 2, radius * 2 ) } ) )
createSlices()
Line 405:
 
function drawChart()
table.insert( res, mw.text.tag( 'div', { class = 'chart', style = string.format( 'margin-top:0.5em;max-width:%spx;', width ) } ) )
table.insert( res, mw.text.tag( 'div', { style = string.format("position:relative;min-height:%spx;min-width:%spx;max-width:%spx;", height, width, width ) } ) )