Skip to content

Commit 83a1cc1

Browse files
authored
Merge pull request #456 from AnnMarieW/update_figure_templates
update figure templates
2 parents 229d34d + 8d9308d commit 83a1cc1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
### Added
66
- Added `disabled` prop for individual options on a `SegmentedControl` #451 by @petefine
77

8+
### Fixed
9+
- Styled the figure buttons in the "mantine_light" and "mantine_dark" Plotly figure templates. #456 by @AnnMarieW
10+
11+
812
# 0.15.1
913

1014
### Added

dash_mantine_components/figure_templates.py

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ def add_figure_templates(default=None):
5050
"paper_bgcolor": "#ffffff", # mantine background color
5151
"plot_bgcolor": "#ffffff",
5252
"gridcolor": "#dee2e6",
53+
"button_bg": colors["gray"][5],
54+
"button_active": colors["gray"][6],
55+
"button_text": "white"
5356
},
5457
"dark": {
5558
"colorway": [
@@ -59,6 +62,9 @@ def add_figure_templates(default=None):
5962
"paper_bgcolor": colors["dark"][7], # mantine background color
6063
"plot_bgcolor": colors["dark"][7],
6164
"gridcolor": "#343a40",
65+
"button_bg": colors["gray"][7],
66+
"button_active": colors["gray"][6],
67+
"button_text": "white"
6268
}
6369
}
6470

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

93+
# Range selector buttons settings
94+
layout.xaxis.rangeselector.font.color = theme_config["button_text"]
95+
layout.xaxis.rangeselector.activecolor = theme_config["button_active"]
96+
layout.xaxis.rangeselector.bgcolor = theme_config["button_bg"]
97+
8798
# Geo settings
8899
layout.geo.bgcolor = theme_config["plot_bgcolor"]
89100
layout.geo.lakecolor = theme_config["plot_bgcolor"]

0 commit comments

Comments
 (0)