mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Handle count in convert_pie_data
This commit is contained in:
parent
c0be0759f2
commit
9c1facd49b
1 changed files with 6 additions and 1 deletions
|
|
@ -1393,7 +1393,12 @@ function graph_utils.convert_pie_data(res, new_charts, js_formatter)
|
|||
|
||||
for _, v in ipairs(res) do
|
||||
labels[#labels+1] = v.label
|
||||
series[#series+1] = v.value
|
||||
|
||||
local value = 0
|
||||
if v.count then value = v.count
|
||||
elseif v.value then value = v.value end
|
||||
series[#series+1] = value
|
||||
|
||||
colors[#colors + 1] = graph_utils.get_html_color(#colors)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue