Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update figure templates #456

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading