}}');
							bar.style.backgroundColor = themeOkColor;
							histogramDiv.appendChild(bar);
						}
					} else {
						// Network errors, server errors (500, 503), or other actual problems
						console.error('Histogram load error for', systemName + ':', err);
						histogramDiv.textContent = 'Error loading data for ' + systemName;
						histogramDiv.style.color = '#999';
						histogramDiv.style.fontSize = '12px';
					}
				});
		});
	})();
</script>
{{ end }}