graylog2-web-interface
graylog2-web-interface copied to clipboard
Dashboard chart widgets show NULL values as 0
Dashboard chart widgets show missing/NULL values as a 0 on the scale. This should be configurable because sometimes you expect missing data but this does not mean that the value was 0.
This is not that easy to achieve at the moment, or at least it would require some time to investigate and play with it. There is mainly one problem:
- Most graphing libraries get confused when giving them data that includes
null,undefined,NaNorInfinity, which are some of the values that we may get when calculating a histogram and no data is available. As far as I know, all the libraries we use have that problem.
The easiest solution would be to leave out all those values and have a fragmented line, but there are also problems with that:
- Some graphing libraries have troubles with discontinuities in area and line graphs, although I would have to double check if the ones we use are affected.
- In bar charts, we need to know the amount of points of data in order to properly calculate the bar width, which is also different depending on the time-range used.
- Having discontinuities in line graphs can be confusing, because when the line is not long enough, it's hard to identify if the widget failed to load the data, or if there is simply not data. I would expect some sort of hover in the second place, but again, we need to see if we can do that with the libraries we have.
Thanks @edmundoa :) What is your proposed solution for now? Maybe it already gets better when we unify search result and dashboard charts because it is less confusing then.
I think the main problem is exactly what you mentioned, @lennartkoopmann: at the moment we have three different libraries and I don't think it is possible to fix this issue on all of them. We need to allocate time to leave only one graphing library for dashboards and search results (or two, if we really need certain feature).
Leaving aside the complication of libraries, the right solution would be to add discontinuities to the graphs when values are null or not present. We should investigate if this is possible and go with this solution.
Another solution would be to still represent null values as zero in graphs, but use the real values in the hover. This has the advantage of being feasible with most graphing libraries, but it's also not really accurate.
Well, null represented as 0 is very, very confusing. In my case, I've ended up changing scale etc. This is not acceptable.
Imo, @lennartkoopmann proposal of this being configurable is quite interesting. As for myself it could be great if there would be an option for graylog to replace null with previous not-null sample or so.