Ansaribinhyder's picture
Enhancement in the UI
815a086
raw
history blame
1.45 kB
<!DOCTYPE html>
<html>
<head>
<title>IPM Data Plots</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background: #f4f4f4;
padding: 20px;
}
img {
max-width: 90%;
border: 1px solid #ccc;
border-radius: 8px;
margin: 15px;
}
select {
padding: 10px;
margin: 20px;
font-size: 16px;
}
.preview-title {
font-weight: bold;
margin-top: 20px;
}
</style>
<script>
function showPlot() {
const col = document.getElementById("col-select").value;
document.getElementById("dynamic-plot").src = "/plot_image/" + encodeURIComponent(col);
}
</script>
</head>
<body>
<h2>📈 IPM Data Comparison</h2>
<h3>Preview (First few plots):</h3>
{% for c in preview_cols %}
<div class="preview-title">{{ c }}</div>
<img src="/plot_image/{{ c }}" alt="{{ c }}">
{% endfor %}
<hr>
<h3>View Other Columns</h3>
<select id="col-select" onchange="showPlot()">
<option disabled selected>Select a column</option>
{% for c in cols %}
<option value="{{ c }}">{{ c }}</option>
{% endfor %}
</select>
<br>
<img id="dynamic-plot" style="display:block; margin:auto; max-width:90%;">
</body>
</html>