22< html lang ="en ">
33< head >
44 < meta charset ="utf-8 " />
5- < title > Hierarchy Filter (Standalone HTML) </ title >
5+ < title > EUCAST ECOFF Coverage Explorer </ title >
66 < style >
77 body { font-family : sans-serif; margin : 1.5rem ; color : # 222 ; }
88 .filter-bar { display : flex; gap : 0.75rem ; align-items : center; margin-bottom : 1rem ; }
4444 </ style >
4545</ head >
4646< body >
47- < h1 > Hierarchy Filter (Demo, Single-HTML) </ h1 >
47+ < h1 > EUCAST ECOFF Coverage Explorer </ h1 >
4848
4949 < div class ="sections ">
5050 < div class ="section ">
@@ -129,7 +129,7 @@ <h2>ECOFF matrix (share ≤ ECOFF)</h2>
129129 const root = { id : `root-${ datasetKey } ` , name : "root" , children : [ ] , isLeaf : false } ;
130130 data . forEach ( item => {
131131 let nodes = root . children ;
132- const fullPath = [ "Alle " , ...item . path , item . label ] ;
132+ const fullPath = [ "All " , ...item . path , item . label ] ;
133133 const pathParts = [ ] ;
134134 fullPath . forEach ( ( segment , idx ) => {
135135 pathParts . push ( segment ) ;
@@ -192,7 +192,7 @@ <h2>ECOFF matrix (share ≤ ECOFF)</h2>
192192 selectAllLeaves ( "ab" ) ;
193193 const sectionConfig = {
194194 mo : {
195- label : "Erreger " ,
195+ label : "Organisms " ,
196196 summaryEl : document . getElementById ( "moSummary" ) ,
197197 bodyEl : document . getElementById ( "moBody" ) ,
198198 treeEl : document . getElementById ( "moTree" ) ,
@@ -203,7 +203,7 @@ <h2>ECOFF matrix (share ≤ ECOFF)</h2>
203203 arrowEl : document . querySelector ( '[data-section="mo"] .arrow' ) ,
204204 } ,
205205 ab : {
206- label : "Antibiotika " ,
206+ label : "Antibiotics " ,
207207 summaryEl : document . getElementById ( "abSummary" ) ,
208208 bodyEl : document . getElementById ( "abBody" ) ,
209209 treeEl : document . getElementById ( "abTree" ) ,
@@ -340,10 +340,10 @@ <h2>ECOFF matrix (share ≤ ECOFF)</h2>
340340 const renderableTree = buildRenderableTree ( BASE_TREES [ datasetKey ] , datasetKey , filters , percentile ) ;
341341 const selectedCodes = collectSelected ( renderableTree , datasetKey , [ ] ) ;
342342 visibleSelected [ datasetKey ] = selectedCodes ;
343- cfg . summaryEl . textContent = `${ selectedCodes . length } ${ cfg . label } ausgewählt ` ;
343+ cfg . summaryEl . textContent = `${ selectedCodes . length } ${ cfg . label } selected ` ;
344344
345345 if ( ! renderableTree ) {
346- treeEl . innerHTML = "<div class=\"meta muted\">Keine Treffer </div>" ;
346+ treeEl . innerHTML = "<div class=\"meta muted\">No matches </div>" ;
347347 return ;
348348 }
349349
@@ -465,29 +465,30 @@ <h2>ECOFF matrix (share ≤ ECOFF)</h2>
465465
466466 function fractionToColor ( fraction ) {
467467 if ( fraction === null || fraction === undefined ) return "#f5f5f5" ;
468- if ( fraction >= 0.99 ) return "#2e7d32" ; // green
469- if ( fraction >= 0.95 ) return "#ffeb3b" ; // yellow
470- return "#c62828" ; // red
468+ const pct = Math . round ( fraction * 100 ) ;
469+ if ( pct >= 99 ) return "#2e7d32" ; // green
470+ if ( pct >= 95 ) return "#ffeb3b" ; // yellow
471+ return "#c62828" ; // red
471472 }
472473
473474 function renderMatrix ( ) {
474475 const container = document . getElementById ( "matrixContainer" ) ;
475476 let moIds = visibleSelected . mo || [ ] ;
476477 let abCodes = visibleSelected . ab || [ ] ;
477478 if ( ! moIds . length || ! abCodes . length ) {
478- container . innerHTML = "Bitte mindestens einen Erreger und ein Antibiotikum auswählen ." ;
479+ container . innerHTML = "Select at least one organism and one antibiotic ." ;
479480 return ;
480481 }
481482
482483 moIds = [ ...moIds ] . sort ( ( a , b ) => {
483484 const ka = ORDER_KEYS . mo . get ( a ) || a ;
484485 const kb = ORDER_KEYS . mo . get ( b ) || b ;
485- return ka . localeCompare ( kb , "de " ) ;
486+ return ka . localeCompare ( kb , "en " ) ;
486487 } ) ;
487488 abCodes = [ ...abCodes ] . sort ( ( a , b ) => {
488489 const ka = ORDER_KEYS . ab . get ( a ) || a ;
489490 const kb = ORDER_KEYS . ab . get ( b ) || b ;
490- return ka . localeCompare ( kb , "de " ) ;
491+ return ka . localeCompare ( kb , "en " ) ;
491492 } ) ;
492493
493494 const table = document . createElement ( "table" ) ;
@@ -498,7 +499,7 @@ <h2>ECOFF matrix (share ≤ ECOFF)</h2>
498499
499500 const corner = document . createElement ( "th" ) ;
500501 corner . className = "sticky-col" ;
501- corner . textContent = "Antibiotikum \\ Erreger " ;
502+ corner . textContent = "Antibiotic \\ Organism " ;
502503 headerRow . appendChild ( corner ) ;
503504
504505 moIds . forEach ( code => {
0 commit comments