Merge pull request #790 from porink0424/fix/add-plot-redirect-click-event-format

Fix some tiny format problems
This commit is contained in:
c-bata
2024-02-02 18:48:52 +09:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
@@ -72,9 +72,9 @@ export const GraphHistory: FC<{
markerSize
)
const element = document.getElementById(plotDomId)
if (element != null && studies.length >= 1) {
if (element !== null && studies.length >= 1) {
// @ts-ignore
element.on("plotly_click", function (data) {
element.on("plotly_click", (data) => {
if (data.points[0].data.mode !== "lines") {
let studyId = 1
if (data.points[0].data.name.includes("Infeasible Trial of")) {
@@ -40,7 +40,7 @@ export const GraphParetoFront: FC<{
const element = document.getElementById(plotDomId)
if (element != null) {
// @ts-ignore
element.on("plotly_click", function (data) {
element.on("plotly_click", (data) => {
const plotTextInfo = JSON.parse(
data.points[0].text.replace(/<br>/g, "")
)