jQWidgets Forums

jQuery UI Widgets Forums Grid 'max' aggregate not working for columns with only negative numbers

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 11 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • aploiicostel
    Member

    The ‘max’ aggregate value is reported correctly only if there’s at least one positive number in the column, otherwise it’s always 0.

    for column: [-4 -11 -1 -2 -7 -7 -7 -5 -11 -7] => max = 0
    for column: [ 4 -11 -1 -2 -7 -7 -7 -5 -11 -7] => max = 4
    for column: [ 4  11  1  2  7  7  7  5  11  7] => max = 11
    

    Tested with jqwidgets-ver3.0.2/demos/jqxgrid/aggregates.htm and all numeric types of datafield (int, number, float):

    $ md5sum aggregates.htm 
    1c6fec7b49e70620abeb0b6024b126d0  aggregates.htm
    
    $ diff -Bbu aggregates.htm my-aggregates.htm
    --- aggregates.htm	2013-08-29 12:13:40.000000000 +0300
    +++ my-aggregates.htm	2013-08-29 16:18:38.210519392 +0300
    @@ -23,6 +23,10 @@
                 // prepare the data
                 var data = generatedata(200);
     
    +            for (var i = 0; i < data.length; i++) {
    +	        data[i]['quantity'] = 0 - data[i]['quantity'];
    +            }
    +
                 var source =
                 {
                     localdata: data,
    

    Dimitar
    Participant

    Hello aploiicostel,

    Thank you for your feedback. We confirm the reported issue and will fix it in the next version of jQWidgets.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.