arcchart: Also compute the sum when the limits are provided.
The result was used even when it wasn't computed.
This commit is contained in:
parent
090f80d173
commit
dbb552097c
|
@ -104,10 +104,11 @@ function arcchart:after_draw_children(_, cr, width, height)
|
|||
local max_val = self:get_max_value()
|
||||
local sum = 0
|
||||
|
||||
for _, v in ipairs(values) do
|
||||
sum = sum + v
|
||||
end
|
||||
|
||||
if not max_val then
|
||||
for _, v in ipairs(values) do
|
||||
sum = sum + v
|
||||
end
|
||||
max_val = sum
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue