Ignore:
Timestamp:
Dec 22, 2011, 4:39:39 PM (12 years ago)
Author:
robert@…
Message:

Boxplot sorting is now improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/visualization/VisualizeController.groovy

    r2138 r2139  
    926926            return_data[ "series" ] = [];
    927927            HashMap dataMap = new HashMap();
     928                       
     929                        List xValues = [];
    928930            groupedData[ xAxis ].eachWithIndex { category, i ->
    929931                if(!dataMap.containsKey(category)) {
    930932                    dataMap.put(category, []);
     933                                        xValues << category;
    931934                }
    932935                dataMap.put(category, dataMap.get(category)+groupedData[ yAxis ][i]);
    933             }
    934 
    935             for ( String key : dataMap.keySet().sort() ) {
     936                               
     937            }
     938
     939            for ( String key : xValues ) {
    936940                def objInfos = computePercentile(dataMap.get(key),50);
    937941                double dblMEDIAN = objInfos.get("value");
Note: See TracChangeset for help on using the changeset viewer.