יחידה:גרפים: הבדלים בין גרסאות בדף

מ הפעיל/ה הגנה על הדף "יחידה:גרפים": דף בשימוש רב ([עריכה=רק בדוקי עריכות אוטומטית מורשים] (בלתי מוגבלת בזמן) [העברה=רק בדוקי עריכות אוטומטית...
מ 41 גרסאות של הדף wikipedia:he:יחידה:גרפים יובאו
 
(9 גרסאות ביניים של 3 משתמשים אינן מוצגות)
שורה 1: שורה 1:
--<source lang=lua>
--<syntaxhighlight lang=lua>
--[[
--[[
     keywords are used for languages: they are the names of the actual
     keywords are used for languages: they are the names of the actual
שורה 68: שורה 68:
         table.insert( tab, mw.text.tag( 'div' ) )
         table.insert( tab, mw.text.tag( 'div' ) )
         local list = {}
         local list = {}
         local spanStyle = "padding:0 1em;background-color:%s;box-shadow:2px -1px 4px 0 silver;margin-right:1em;"
         local spanStyle = "padding:0 1em;background-color:%s;border:1px solid %s;margin-right:1em;-webkit-print-color-adjust:exact;"
         for gi = 1, #legends do
         for gi = 1, #legends do
             local span = mw.text.tag( 'span', { style = string.format( spanStyle, cols[gi] ) }, '&nbsp;' ) .. ' '..  legends[gi]
             local span = mw.text.tag( 'span', { style = string.format( spanStyle, cols[gi], cols[gi] ) }, '&nbsp;' ) .. ' '..  legends[gi]
             table.insert( list, mw.text.tag( 'li', {}, span ) )
             table.insert( list, mw.text.tag( 'li', {}, span ) )
         end
         end
שורה 101: שורה 101:
             local value, name, color, link = unpack( mw.text.split( slice, '%s*' .. delimiter .. '%s*' ) )
             local value, name, color, link = unpack( mw.text.split( slice, '%s*' .. delimiter .. '%s*' ) )
             values[i] = tonumber( lang:parseFormattedNumber( value ) )
             values[i] = tonumber( lang:parseFormattedNumber( value ) )
                 or error( string.format( 'Slice %d: "%s", first item("%s") could not be parsed as a number', i, value or '', sliceStr ) )
                 or error( string.format( 'Slice %d: \"%s\" could not be parsed as a number', i, value or '' ) )
             colors[i] = not nulOrWhitespace( color ) and color or defColors[i]
             colors[i] = not nulOrWhitespace( color ) and color or defColors[i]
             names[i] = name or ''
             names[i] = name or ''
שורה 477: שורה 477:
     [keywords.pieChart] = pieChart,
     [keywords.pieChart] = pieChart,
}
}
--</source>
--</syntaxhighlight>