mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Fixes charts label not correctly computed
This commit is contained in:
parent
93166909a2
commit
4a6b6ec676
1 changed files with 7 additions and 4 deletions
|
|
@ -502,21 +502,24 @@ function driver:timeseries_query(options)
|
|||
|
||||
-- Process the series requested, adding statistics if requested (min, max, tot, ...)
|
||||
-- and normalize the data if needed
|
||||
for _, serie_name in pairs(names) do
|
||||
for name, _ in pairs(fdata) do
|
||||
serie_idx = serie_idx + 1 -- the first id is 1
|
||||
local max_val = ts_common.getMaxPointValue(options.schema_info, serie_name, options.tags)
|
||||
local name = options.schema_info._metrics[serie_idx]
|
||||
local fdata_name = names[serie_idx]
|
||||
local serie = fdata[fdata_name]
|
||||
local max_val = ts_common.getMaxPointValue(options.schema_info, name, options.tags)
|
||||
local modified_serie = {}
|
||||
count = 0
|
||||
|
||||
-- Normalize the value
|
||||
for i, v in pairs(fdata[serie_name]) do
|
||||
for i, v in pairs(serie) do
|
||||
modified_serie[i] = ts_common.normalizeVal(v, max_val, options)
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
series[#series + 1] = {
|
||||
data = modified_serie,
|
||||
id = serie_name
|
||||
id = name
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue