import glob import pathlib from plotly.io import templates from webviz_config import WebvizConfigTheme default_theme = WebvizConfigTheme(theme_name="default") # pylint: disable=invalid-name default_theme.assets = glob.glob( str(pathlib.Path(__file__).resolve().parent / "default_assets" / "*")) default_theme.plotly_theme = templates["plotly"].to_plotly_json()
equinor_theme = WebvizConfigTheme(theme_name="equinor") equinor_theme.external_stylesheets = [ "https://eds-static.equinor.com/font/equinor-font.css" ] equinor_theme.adjust_csp( { "font-src": ["https://eds-static.equinor.com"], "img-src": ["https://eds-static.equinor.com"], "style-src": ["https://eds-static.equinor.com"], }, append=True, ) equinor_theme.assets = glob.glob( os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets", "*")) equinor_theme.plotly_theme = { "layout": { "font": { "family": "Equinor" }, "hoverlabel": { "font": { "family": "Equinor" } }, "plot_bgcolor": "white", "colorscale": { "diverging": [
import os import glob from plotly.io import templates from webviz_config import WebvizConfigTheme default_theme = WebvizConfigTheme(theme_name="default") # pylint: disable=invalid-name default_theme.assets = glob.glob( os.path.join(os.path.dirname(os.path.abspath(__file__)), "default_assets", "*")) default_theme.plotly_theme = templates["plotly"].to_plotly_json()