יחידה:גרפים: הבדלים בין גרסאות בדף
ניסוי |
לא להציג כותרות לפלחים ריקים (לטובת תבנית:דיאגרמת עוגה ) |
||
| שורה 27: | שורה 27: | ||
xrotation = 'סיבוב כותרות', | xrotation = 'סיבוב כותרות', | ||
valueInBar = 'הצגת הערך בעמודה', | valueInBar = 'הצגת הערך בעמודה', | ||
legendsForEmptySlices = 'הצג כותרות לפלחים ריקים', | |||
} -- here is what you want to translate | } -- here is what you want to translate | ||
| שורה 107: | שורה 108: | ||
radius = getArg( 'radius', 150 ) | radius = getArg( 'radius', 150 ) | ||
legendsForEmptySlices = getArg( 'legendsForEmptySlices' ) | |||
local slicesStr = getArg( 'slices' ) | local slicesStr = getArg( 'slices' ) | ||
local prefix = getArg( 'unitsPrefix', '', '_', ' ' ) | local prefix = getArg( 'unitsPrefix', '', '_', ' ' ) | ||
| שורה 207: | שורה 209: | ||
addRes( '</div>' ) -- close "position:relative" div that contains slices and imagemap. | addRes( '</div>' ) -- close "position:relative" div that contains slices and imagemap. | ||
addRes( '</div>' ) -- close "position:relative" div that contains slices and imagemap. | addRes( '</div>' ) -- close "position:relative" div that contains slices and imagemap. | ||
if not legendsForEmptySlices then | |||
for i = #values, 1, -1 do | |||
if values[i] <= 0 then table.remove( legends, i ) end | |||
end | |||
end | |||
createGroupList( res, legends, colors ) -- legends | createGroupList( res, legends, colors ) -- legends | ||
addRes( '</div>' ) -- close containing div | addRes( '</div>' ) -- close containing div | ||