Rename PlotlyDarkTheme to PlotlyCloroTemplates

This commit is contained in:
gen740
2023-12-28 16:03:37 +09:00
parent 1a61af6d86
commit 0d5db75167
11 changed files with 10 additions and 11 deletions
@@ -13,7 +13,7 @@ import {
} from "@mui/material"
import blue from "@mui/material/colors/blue"
import { useMergedUnionSearchSpace } from "../searchSpace"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { useRecoilValue } from "recoil"
import { plotlyColorTheme } from "../state"
import { getAxisInfo } from "../graphUtil"
+1 -1
View File
@@ -2,7 +2,7 @@ import * as plotly from "plotly.js-dist-min"
import React, { FC, useEffect, useMemo } from "react"
import { Typography, useTheme, Box } from "@mui/material"
import { Target, useFilteredTrialsFromStudies } from "../trialFilter"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
@@ -20,7 +20,7 @@ import {
Target,
useObjectiveAndUserAttrTargetsFromStudies,
} from "../trialFilter"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
@@ -5,7 +5,7 @@ import { Typography, useTheme, Box, Card, CardContent } from "@mui/material"
import { actionCreator } from "../action"
import { useParamImportanceValue, useStudyDirections } from "../state"
const plotDomId = "graph-hyperparameter-importances"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
@@ -1,7 +1,7 @@
import * as plotly from "plotly.js-dist-min"
import React, { FC, useEffect } from "react"
import { Box, Typography, useTheme, CardContent, Card } from "@mui/material"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
@@ -9,7 +9,7 @@ import {
FormControlLabel,
Checkbox,
} from "@mui/material"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { useRecoilValue } from "recoil"
import { plotlyColorTheme } from "../state"
import {
@@ -12,7 +12,7 @@ import {
Box,
} from "@mui/material"
import { makeHovertext } from "../graphUtil"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
+1 -1
View File
@@ -13,7 +13,7 @@ import {
} from "@mui/material"
import { getAxisInfo, makeHovertext } from "../graphUtil"
import { useMergedUnionSearchSpace } from "../searchSpace"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
@@ -19,7 +19,7 @@ import {
useParamTargets,
} from "../trialFilter"
import { useMergedUnionSearchSpace } from "../searchSpace"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
@@ -2,7 +2,7 @@ import * as plotly from "plotly.js-dist-min"
import React, { FC, useEffect } from "react"
import { Card, CardContent, Grid, Typography, useTheme } from "@mui/material"
import { makeHovertext } from "../graphUtil"
import { getColorTemplate } from "./PlotlyDarkMode"
import { getColorTemplate } from "./PlotlyColorTemplates"
import { plotlyColorTheme } from "../state"
import { useRecoilValue } from "recoil"
@@ -3,7 +3,6 @@ import * as plotly from "plotly.js-dist-min"
// Following template is extracted from the sdist of plotly Python library.
// See https://github.com/plotly/plotly.py/blob/v5.6.0/packages/python/plotly/templategen/__init__.py and
// https://github.com/plotly/plotly.py/blob/v5.6.0/packages/python/plotly/templategen/definitions.py
export const getColorTemplate = (mode: string, theme: PlotlyColorTheme): Partial<Plotly.Template> => {
console.log("getColorTeplate", mode, theme.dark, theme.light)
if (mode === "dark") {