0

I'm trying to sort d3 table on 2 tables and every browser does it ok except chrome. What problem can it be and how to fix it?

My code:

enter code her}).done( function (response) {
    response.sort(function(x, y){
        return d3.ascending(x.DQI_FROM_SPEC, y.DQI_FROM_SPEC);
    });
    response.sort(function(x, y){
        return d3.ascending(x.AREA, y.AREA);
    });e
Egor
  • 1
  • 1
    The first sorting makes no sense, will be changed by the second one. – Jonas Wilms Jun 01 '18 at 14:34
  • 1
    Thanks guys. I found a solution: response.sort(function(x, y){ return d3.ascending(x.AREA, y.AREA) || d3.ascending(x.DQI_FROM_SPEC, y.DQI_FROM_SPEC); }); – Egor Jun 01 '18 at 15:03

0 Answers0