From c91098b8536075ec74d53dcc73419e67e7e9e171 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Wed, 22 May 2024 15:08:42 +0000 Subject: [PATCH] set label whether kinetic or binding energy --- src/App.tsx | 6 +++++- src/Plot.tsx | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 1de075b..f65ccbd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -422,7 +422,11 @@ function App(): JSX.Element { - + {data.map((value, key) => ( diff --git a/src/Plot.tsx b/src/Plot.tsx index 81a886f..cac27a1 100644 --- a/src/Plot.tsx +++ b/src/Plot.tsx @@ -29,7 +29,7 @@ function ScatterPlot({ ]; let layout: Partial = { - xaxis: { title: { text: "Energy (eV)" } }, + xaxis: { title: { text: "Kinetic Energy (eV)" } }, yaxis: { title: { text: "Intensity (a.u.)" } }, font: { size: 14 }, autosize: false, @@ -46,7 +46,7 @@ function ScatterPlot({ if (isBinding) { layout = { ...layout, - xaxis: { title: { text: "Energy (eV)" }, autorange: "reversed" }, + xaxis: { title: { text: "Binding Energy (eV)" }, autorange: "reversed" }, }; }
Energy (eV) + {config.isBinding + ? "Binding Energy (eV)" + : "Kinetic Energy (eV)"} + Intensity (a.u.)