@@ -99,8 +99,8 @@ Circle size = log(sample count). Color = dominant data source.
9999<div class =" panel-section " >
100100<div class =" stats-compact " >
101101<div class =" stat-box " ><span id =" sPhase " class =" val " >Loading...</span ><span class =" lbl " >Resolution</span ></div >
102- <div class =" stat-box " ><span id =" sPoints " class =" val " >0</span ><span id =" sPointsLbl " class =" lbl " >Clusters</span ></div >
103- <div class =" stat-box " ><span id =" sSamples " class =" val " >0</span ><span class =" lbl " >Samples</span ></div >
102+ <div class =" stat-box " ><span id =" sPoints " class =" val " >0</span ><span id =" sPointsLbl " class =" lbl " >Clusters Loaded </span ></div >
103+ <div class =" stat-box " ><span id =" sSamples " class =" val " >0</span ><span id = " sSamplesLbl " class =" lbl " >Samples Loaded </span ></div >
104104<div class =" stat-box " ><span id =" sTime " class =" val " >-</span ><span class =" lbl " >Load Time</span ></div >
105105</div >
106106<div style =" margin-top : 8px ;" >
@@ -195,13 +195,14 @@ function buildHash(v) {
195195}
196196
197197// === Helpers: update DOM imperatively (no OJS reactivity) ===
198- function updateStats(phase, points, samples, time, pointsLabel) {
198+ function updateStats(phase, points, samples, time, pointsLabel, samplesLabel ) {
199199 const s = (id, v) => { const e = document.getElementById(id); if (e) e.textContent = v; };
200200 s('sPhase', phase);
201201 s('sPoints', typeof points === 'string' ? points : points.toLocaleString());
202202 s('sSamples', typeof samples === 'string' ? samples : samples.toLocaleString());
203203 if (time != null) s('sTime', time);
204204 if (pointsLabel) s('sPointsLbl', pointsLabel);
205+ if (samplesLabel) s('sSamplesLbl', samplesLabel);
205206}
206207
207208function updatePhaseMsg(text, type) {
@@ -494,7 +495,7 @@ phase1 = {
494495 performance.measure('p1', 'p1-start', 'p1-end');
495496 const elapsed = performance.getEntriesByName('p1').pop().duration;
496497
497- updateStats('H3 Res4', data.length, totalSamples, `${(elapsed/1000).toFixed(1)}s`, 'Global Clusters');
498+ updateStats('H3 Res4', data.length, totalSamples, `${(elapsed/1000).toFixed(1)}s`, 'Clusters Loaded', 'Samples Loaded ');
498499 updatePhaseMsg(`${data.length.toLocaleString()} clusters, ${totalSamples.toLocaleString()} samples. Zoom in for finer detail.`, 'done');
499500 console.log(`Phase 1: ${data.length} clusters in ${elapsed.toFixed(0)}ms`);
500501
@@ -567,7 +568,7 @@ zoomWatcher = {
567568 // Show viewport count immediately
568569 const bounds = getViewportBounds();
569570 const inView = countInViewport(bounds);
570- updateStats(`H3 Res${res}`, `${inView.clusters.toLocaleString()} / ${data.length.toLocaleString()}`, inView.samples.toLocaleString(), `${(elapsed/1000).toFixed(1)}s`, 'In View / Total ');
571+ updateStats(`H3 Res${res}`, `${inView.clusters.toLocaleString()} / ${data.length.toLocaleString()}`, inView.samples.toLocaleString(), `${(elapsed/1000).toFixed(1)}s`, 'Clusters in View / Loaded', 'Samples in View ');
571572 updatePhaseMsg(`${data.length.toLocaleString()} clusters, ${total.toLocaleString()} samples. ${res < 8 ? 'Zoom in for finer detail.' : 'Zoom closer for individual samples.'}`, 'done');
572573
573574 currentRes = res;
@@ -667,7 +668,7 @@ zoomWatcher = {
667668
668669 renderSamplePoints(cachedData, bounds);
669670
670- updateStats('Samples', cachedData.length, cachedData.length, `${(elapsed/1000).toFixed(1)}s`, 'In View');
671+ updateStats('Samples', cachedData.length, cachedData.length, `${(elapsed/1000).toFixed(1)}s`, 'Samples in View', 'Samples in View');
671672 updatePhaseMsg(`${cachedData.length.toLocaleString()} individual samples. Click one for details.`, 'done');
672673 console.log(`Point mode: ${cachedData.length} samples in ${elapsed.toFixed(0)}ms`);
673674
@@ -730,9 +731,9 @@ zoomWatcher = {
730731 const inView = countInViewport(bounds);
731732 const total = viewer._clusterTotal;
732733 if (total) {
733- updateStats(`H3 Res${currentRes}`, `${inView.clusters.toLocaleString()} / ${total.clusters.toLocaleString()}`, inView.samples.toLocaleString(), '—', 'In View / Total ');
734+ updateStats(`H3 Res${currentRes}`, `${inView.clusters.toLocaleString()} / ${total.clusters.toLocaleString()}`, inView.samples.toLocaleString(), '—', 'Clusters in View / Loaded', 'Samples in View ');
734735 } else {
735- updateStats(`H3 Res${currentRes}`, viewer.h3Points.length, '—', '—', 'Global Clusters');
736+ updateStats(`H3 Res${currentRes}`, viewer.h3Points.length, '—', '—', 'Clusters Loaded', 'Samples Loaded ');
736737 }
737738 updatePhaseMsg(`${inView.clusters.toLocaleString()} clusters in view. Zoom closer for individual samples.`, 'done');
738739 console.log('Exited point mode');
@@ -780,7 +781,7 @@ zoomWatcher = {
780781 const inView = countInViewport(bounds);
781782 const total = viewer._clusterTotal;
782783 if (total) {
783- updateStats(`H3 Res${currentRes}`, `${inView.clusters.toLocaleString()} / ${total.clusters.toLocaleString()}`, inView.samples.toLocaleString(), null, 'In View / Total ');
784+ updateStats(`H3 Res${currentRes}`, `${inView.clusters.toLocaleString()} / ${total.clusters.toLocaleString()}`, inView.samples.toLocaleString(), null, 'Clusters in View / Loaded', 'Samples in View ');
784785 }
785786 }
786787
0 commit comments