Ansys Gain Plot Viewer

Interactive plot browser

700 MHz

1 of 11
FirstUse the slider or click a labelLast

Use the arrows, the dropdown, the slider, or your keyboard left/right arrow keys to move through the plots.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ansys Gain Plot Viewer</title>
<style>
:root {--gp-bg:#fff;--gp-panel:#f7f7f8;--gp-text:#171717;--gp-muted:#666;--gp-border:#d9d9de;--gp-accent:#1f6feb;--gp-accent-soft:#e8f1ff;--gp-radius:16px;--gp-shadow:0 10px 30px rgba(0,0,0,.10)}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--gp-bg);color:var(--gp-text)}
.gain-plot-viewer{width:min(100%,980px);margin:0 auto;padding:20px}
.gp-card{background:#fff;border:1px solid var(--gp-border);border-radius:var(--gp-radius);box-shadow:var(--gp-shadow);overflow:hidden}
.gp-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid var(--gp-border);background:var(--gp-panel)}
.gp-title-wrap{min-width:0}
.gp-eyebrow{margin:0 0 2px;color:var(--gp-muted);font-size:13px;letter-spacing:.02em}
.gp-title{margin:0;font-size:clamp(20px,3vw,30px);line-height:1.1}
.gp-counter{color:var(--gp-muted);font-size:14px;white-space:nowrap}
.gp-stage{position:relative;display:grid;place-items:center;padding:14px;background:#fff}
.gp-image{display:block;width:100%;max-height:78vh;object-fit:contain;border-radius:10px;user-select:none}
.gp-nav-btn{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border:1px solid rgba(0,0,0,.12);border-radius:999px;background:rgba(255,255,255,.88);color:var(--gp-text);box-shadow:0 3px 12px rgba(0,0,0,.18);cursor:pointer;font-size:28px;line-height:1;display:grid;place-items:center}
.gp-nav-btn:hover,.gp-nav-btn:focus-visible{background:#fff;outline:3px solid var(--gp-accent-soft)}
.gp-prev{left:18px} .gp-next{right:18px}
.gp-controls{display:grid;gap:14px;padding:16px 18px 18px;border-top:1px solid var(--gp-border);background:var(--gp-panel)}
.gp-select-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.gp-select-row label{font-weight:650;font-size:14px}
.gp-select{min-width:170px;padding:10px 12px;border:1px solid var(--gp-border);border-radius:10px;background:#fff;color:var(--gp-text);font:inherit}
.gp-range-wrap{display:grid;gap:8px}
.gp-range-labels{display:flex;justify-content:space-between;gap:8px;color:var(--gp-muted);font-size:12px}
.gp-range{width:100%;accent-color:var(--gp-accent)}
.gp-tabs{display:flex;flex-wrap:wrap;gap:8px}
.gp-tab{border:1px solid var(--gp-border);background:#fff;color:var(--gp-text);border-radius:999px;padding:8px 12px;cursor:pointer;font:inherit;font-size:14px}
.gp-tab:hover,.gp-tab:focus-visible{border-color:var(--gp-accent);outline:none}
.gp-tab[aria-selected="true"]{background:var(--gp-accent);border-color:var(--gp-accent);color:#fff}
.gp-help{margin:0;color:var(--gp-muted);font-size:13px}
@media(max-width:640px){.gain-plot-viewer{padding:10px}.gp-header{align-items:flex-start;flex-direction:column}.gp-nav-btn{width:38px;height:38px;font-size:24px}.gp-prev{left:10px}.gp-next{right:10px}.gp-tabs{display:none}}
</style>
</head>
<body>
<!--
  To use:
  1. Upload your images to your website/media library.
  2. Copy each image URL.
  3. Replace the placeholder URLs inside the gainImages array below.
  4. Upload this HTML file, or paste the code into your page/template.

  Iframe embed example:
  <iframe src="/path/to/ansys_gain_plot_viewer_placeholder_links.html" style="width:100%;height:850px;border:0;" title="Ansys Gain Plot Viewer"></iframe>
-->
<main class="gain-plot-viewer" id="gainPlotViewer" aria-label="Ansys gain plot image viewer">
<section class="gp-card">
<header class="gp-header">
<div class="gp-title-wrap">
<p class="gp-eyebrow">Interactive plot browser</p>
<h1 class="gp-title" id="gpTitle">700 MHz</h1>
</div>
<div class="gp-counter" id="gpCounter">1 of 11</div>
</header>
<div class="gp-stage">
<button class="gp-nav-btn gp-prev" id="gpPrev" type="button" aria-label="Previous image">&#8249;</button>
<img class="gp-image" id="gpImage" alt="" />
<button class="gp-nav-btn gp-next" id="gpNext" type="button" aria-label="Next image">&#8250;</button>
</div>
<div class="gp-controls">
<div class="gp-select-row">
<label for="gpSelect">Jump to plot:</label>
<select class="gp-select" id="gpSelect" aria-label="Select plot"></select>
</div>
<div class="gp-range-wrap">
<div class="gp-range-labels"><span>First</span><span>Use the slider or click a label</span><span>Last</span></div>
<input class="gp-range" id="gpRange" type="range" min="0" max="10" step="1" value="0" aria-label="Scrollable plot selector" />
</div>
<div class="gp-tabs" id="gpTabs" role="tablist" aria-label="Plot labels"></div>
<p class="gp-help">Use the arrows, the dropdown, the slider, or your keyboard left/right arrow keys to move through the plots.</p>
</div>
</section>
</main>
<script>
const gainImages = [
  { label: '700 MHz', alt: 'Ansys gain plot at 700 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_700.jpg' },
  { label: '800 MHz', alt: 'Ansys gain plot at 800 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_800.jpg' },
  { label: '900 MHz', alt: 'Ansys gain plot at 900 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_900.jpg' },
  { label: '1800 MHz', alt: 'Ansys gain plot at 1800 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_1800.jpg' },
  { label: '1900 MHz', alt: 'Ansys gain plot at 1900 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_1900.jpg' },
  { label: '2100 MHz', alt: 'Ansys gain plot at 2100 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_2100.jpg' },
  { label: '2400 MHz', alt: 'Ansys gain plot at 2400 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_2400.jpg' },
  { label: '2500 MHz', alt: 'Ansys gain plot at 2500 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_2500.jpg' },
  { label: '2600 MHz', alt: 'Ansys gain plot at 2600 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_2600.jpg' },
  { label: '3500 MHz', alt: 'Ansys gain plot at 3500 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_3500.jpg' },
  { label: '3700 MHz', alt: 'Ansys gain plot at 3700 MHz', src: 'https://maxview.co.uk/wp-content/uploads/2026/05/Total_gain_3600.jpg' }
];

const imageEl = document.getElementById("gpImage");
const titleEl = document.getElementById("gpTitle");
const counterEl = document.getElementById("gpCounter");
const prevBtn = document.getElementById("gpPrev");
const nextBtn = document.getElementById("gpNext");
const selectEl = document.getElementById("gpSelect");
const rangeEl = document.getElementById("gpRange");
const tabsEl = document.getElementById("gpTabs");

let currentIndex = 0;

function renderControls() {
  gainImages.forEach(function(item, index) {
    const option = document.createElement("option");
    option.value = String(index);
    option.textContent = item.label;
    selectEl.appendChild(option);

    const button = document.createElement("button");
    button.type = "button";
    button.className = "gp-tab";
    button.role = "tab";
    button.textContent = item.label;
    button.setAttribute("aria-selected", index === 0 ? "true" : "false");
    button.addEventListener("click", function() {
      setImage(index);
    });
    tabsEl.appendChild(button);
  });
}

function setImage(index) {
  currentIndex = (index + gainImages.length) % gainImages.length;
  const item = gainImages[currentIndex];

  imageEl.src = item.src;
  imageEl.alt = item.alt;
  titleEl.textContent = item.label;
  counterEl.textContent = (currentIndex + 1) + " of " + gainImages.length;
  selectEl.value = String(currentIndex);
  rangeEl.value = String(currentIndex);

  Array.prototype.forEach.call(tabsEl.children, function(tab, tabIndex) {
    tab.setAttribute("aria-selected", tabIndex === currentIndex ? "true" : "false");
  });
}

function nextImage() { setImage(currentIndex + 1); }
function previousImage() { setImage(currentIndex - 1); }

prevBtn.addEventListener("click", previousImage);
nextBtn.addEventListener("click", nextImage);

selectEl.addEventListener("change", function(event) {
  setImage(Number(event.target.value));
});

rangeEl.addEventListener("input", function(event) {
  setImage(Number(event.target.value));
});

document.addEventListener("keydown", function(event) {
  if (event.key === "ArrowRight") nextImage();
  if (event.key === "ArrowLeft") previousImage();
});

renderControls();
setImage(0);
</script>
</body>
</html>