+
+ {CATS.map(c => (
+
{c.slice(0,3).toUpperCase()}
+ ))}
+ {GROUPS.map(g => (
+ <>
+
{g}
+ {CATS.map(cat => {
+ const v = DATA[g][cat];
+ const alpha = v/MAX_VAL;
+ return (
+
setHighlighted(highlighted===g?null:g)}
+ style={{
+ height:20,borderRadius:4,cursor:'pointer',
+ background: v>0 ? `rgba(${hexToRgb(COLORS[cat])},${0.15+alpha*0.75})` : 'rgba(255,255,255,0.04)',
+ border: highlighted===g ? `1px solid ${COLORS[cat]}80` : '1px solid transparent',
+ display:'flex',alignItems:'center',justifyContent:'center',
+ fontSize:10,color:v>0?'rgba(255,255,255,0.9)':'rgba(255,255,255,0.15)',
+ fontWeight:700,transition:'all 0.2s',
+ }}>
+ {v||'·'}
+
+ );
+ })}
+ >
+ ))}
+