Skip to content

Commit

Permalink
Merge pull request #456 from AnnMarieW/update_figure_templates
Browse files Browse the repository at this point in the history
update figure templates
  • Loading branch information
AnnMarieW authored Dec 12, 2024
2 parents 229d34d + 8d9308d commit 83a1cc1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
### Added
- Added `disabled` prop for individual options on a `SegmentedControl` #451 by @petefine

### Fixed
- Styled the figure buttons in the "mantine_light" and "mantine_dark" Plotly figure templates. #456 by @AnnMarieW


# 0.15.1

### Added
Expand Down
11 changes: 11 additions & 0 deletions dash_mantine_components/figure_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def add_figure_templates(default=None):
"paper_bgcolor": "#ffffff", # mantine background color
"plot_bgcolor": "#ffffff",
"gridcolor": "#dee2e6",
"button_bg": colors["gray"][5],
"button_active": colors["gray"][6],
"button_text": "white"
},
"dark": {
"colorway": [
Expand All @@ -59,6 +62,9 @@ def add_figure_templates(default=None):
"paper_bgcolor": colors["dark"][7], # mantine background color
"plot_bgcolor": colors["dark"][7],
"gridcolor": "#343a40",
"button_bg": colors["gray"][7],
"button_active": colors["gray"][6],
"button_text": "white"
}
}

Expand All @@ -84,6 +90,11 @@ def make_template(name):
axis.gridwidth = 0.5
axis.zerolinecolor = theme_config["gridcolor"]

# Range selector buttons settings
layout.xaxis.rangeselector.font.color = theme_config["button_text"]
layout.xaxis.rangeselector.activecolor = theme_config["button_active"]
layout.xaxis.rangeselector.bgcolor = theme_config["button_bg"]

# Geo settings
layout.geo.bgcolor = theme_config["plot_bgcolor"]
layout.geo.lakecolor = theme_config["plot_bgcolor"]
Expand Down

0 comments on commit 83a1cc1

Please sign in to comment.