
export const toLower = el => el = el.toLowerCase();

export const getUniqCats = data => { 
    const sectors = [];       
    data.forEach(el => {
        if(el.CAT && sectors.indexOf(el.CAT) === -1){
            sectors.push(el.CAT);				
        }
    });
    return sectors;
};

export const getUniqSubcats = subcatConfig => {
    const subcats = [];
    subcatConfig.forEach(el => {
        el.SUBCAT && subcats.push(el.SUBCAT);    
    });
    return subcats;
};

export const configData = (data, config, subcatConfig) => {                                     
    data.forEach(el => {   
        for(let i = 0; i < config.length; i++){
            if(el.STATUS && el.STATUS === config[i].TITLE){
                el.statusId = config[i].ID;     
                el.radius = Number(config[i].RADIUS); 
                el.minRadius = Number(config[i].minRadius); 
            }
        }; 
        if(subcatConfig){                
            for(let i = 0; i < subcatConfig.length; i++){
                if(el.SUBCAT && el.SUBCAT === subcatConfig[i].SUBCAT){
                    el.subcatId = subcatConfig[i].ID;
                }	
            };
        }
    });
};
@@ -1,20 +1,21 @@
+%0A
 %0Aexport const toLowe
@@ -12,23 +12,22 @@
 nst 
-toLower
+format
  = el =%3E
  el 
@@ -22,16 +22,22 @@
  = el =%3E
+ %7B%0A   
  el = el
@@ -51,16 +51,90 @@
 rCase();
+%0A    if(!el.replace(/%5Cs/g, %22%22).length) el = %22%22;  %0A    return el;    %0A%7D;   
 %0A%0Aexport
@@ -286,16 +286,34 @@
         
+ el.CAT !== %22 %22 &&
  sectors
@@ -556,24 +556,295 @@
 ubcats;%0A%7D;%0A%0A
+export const setRadii = (el, config) =%3E %7B%0A    for(let i = 0; i %3C config.length; i++)%7B%0A        if(el.STATUS && el.STATUS === config%5Bi%5D.TITLE)%7B%0A            el.radius = Number(config%5Bi%5D.RADIUS); %0A            el.minRadius = Number(config%5Bi%5D.minRadius); %0A        %7D%0A    %7D;%0A%7D;%0A%0A
 export const
@@ -1107,27 +1107,33 @@
 g%5Bi%5D.ID;
+  %0A
      
-%0A
      
+  %7D%0A
         
@@ -1139,50 +1139,31 @@
     
-el.radius = Number(config%5Bi%5D.RADIUS); %0A   
+ setRadii(el, config);%0A
     
@@ -1174,67 +1174,50 @@
     
- 
 el.
-minRadius = Number(config%5Bi%5D.minRadius); %0A            %7D
+colorId = !el.CAT ? 'c0' : el.statusId;
 %0A   
@@ -1486,26 +1486,74 @@
    %7D;%0A        %7D%0A
+        if(!el.subcatId) el.subcatId = '0';    %0A
     %7D);%0A%7D;
@@ -1548,12 +1548,13 @@
  %0A    %7D);%0A%7D;
+%0A

Update formatData.js