Bug 971648 - Min Values in Graph Legend on right shows 0 when sometimes not true
Summary: Min Values in Graph Legend on right shows 0 when sometimes not true
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.8
Assignee: Mike Thompson
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-07 04:46 UTC by Mike Thompson
Modified: 2013-09-11 09:52 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-11 09:52:47 UTC
Embargoed:


Attachments (Terms of Use)
Min value error (87.66 KB, image/png)
2013-06-07 04:49 UTC, Mike Thompson
no flags Details
Screen capture showing corrected results. (553.24 KB, image/jpeg)
2013-06-07 16:41 UTC, Mike Thompson
no flags Details

Description Mike Thompson 2013-06-07 04:46:16 UTC
Description of problem:
The min appears to be zero sometimes when it looks like it should not be. Possibly counting NaN values as zero?

The code should avoid this as it handles undefined values:

 min = $wnd.d3.min(chartContext.data.map(function (d) {
                        if (d.low != undefined) {
                            return d.low;
                        }
                        else {
                            return Number.MAX_VALUE;
                        }
                    }));

Maybe missing a case.

Comment 1 Mike Thompson 2013-06-07 04:49:06 UTC
Created attachment 757982 [details]
Min value error

Comment 2 Mike Thompson 2013-06-07 16:38:26 UTC
This was actually affecting min, max and avg values as the NaN's were not properly being filtered first before the applying the mean calculation. I have added the filter operation first now and values appear correct see attachment.

commit to master: a0c9230

Comment 3 Mike Thompson 2013-06-07 16:41:07 UTC
Created attachment 758244 [details]
Screen capture showing corrected results.

Comment 4 Mike Thompson 2013-06-07 20:10:19 UTC
Also committed additional bug fix to 
master: 9ad39f0
for a regression that I introduced with this fix via commit a0c9230.

Comment 5 Heiko W. Rupp 2013-09-11 09:52:47 UTC
Bulk closing of old issues now that HRQ 4.9 is in front of the door.

If you think the issue has not been solved, then please open a new bug and mention this one in the description.


Note You need to log in before you can comment on or make changes to this bug.