יחידה:גרפים – הבדלי גרסאות
חלוקת קונטרסים (שיחה | תרומות) מויקיפדיה: https://he.wikipedia.org/wiki/%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%92%D7%A8%D7%A4%D7%99%D7%9D |
אין תקציר עריכה |
||
| שורה 202: | שורה 202: | ||
if #values == 0 then error( "no slices found - can't draw pie chart" ) end | if #values == 0 then error( "no slices found - can't draw pie chart" ) end | ||
addRes( mw.text.tag( 'div', { style = string.format( "max-width:%spx", radius * 2 ) } ) ) | addRes( mw.text.tag( 'div', { style = string.format( "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 ) } ) ) | addRes( mw.text.tag( 'div', { style = string.format( 'border-radius:100%%;border:1px solid #000;position:relative;min-width:%spx;min-height:%spx;max-width:%spx;overflow:hidden;', radius * 2, radius * 2, radius * 2 ) } ) ) | ||
createSlices() | createSlices() | ||
addRes( '</div>' ) -- close "position:relative" div that contains slices and imagemap. | addRes( '</div>' ) -- close "position:relative" div that contains slices and imagemap. | ||
createGroupList( res, legends, colors ) -- legends | createGroupList( res, legends, colors ) -- legends | ||