ydataai / ydata-profiling

1 Line of code data quality profiling & exploratory data analysis for Pandas and Spark DataFrames.
https://docs.profiling.ydata.ai
MIT License
12.51k stars 1.68k forks source link

Setting Dark Mode only changes the Header #1653

Open alikleit opened 1 month ago

alikleit commented 1 month ago

Current Behaviour

dark_mode=True only applies to the header, setting config theme to dark breaks the html

Expected Behaviour

background and components to be dark, with font-color to be white

Data Description

df = pd.DataFrame(np.random.rand(100, 5), columns=["a(°C)", "b", "c", "d", "e"])

Code that reproduces the bug

profile = ProfileReport( df,
                        dark_mode=True,
                        )

# this line breaks the html
profile.config.html.style.theme = "dark"

pandas-profiling version

v4.10.0

Dependencies

[tool.poetry]
name = "ydata-profiling-prototype"
version = "0.1.0"
description = ""
authors = ["AliKleit <ali.kleit@novasign.at>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "~3.11"
cloudpickle = "3.0.0"
betterproto = {extras = ["compiler"], version = "^2.0.0b6", allow-prereleases = true}
blackcellmagic = "^0.0.3"
ruff = "^0.6.1"
ydata-profiling = "^4.10.0"
numpy = "2.0.1"
openpyxl = "^3.1.5"

[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.5"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

OS

Ubunto (WSL)

Checklist

fabclmnt commented 3 weeks ago

Hi @alikleit ,

thank you for reporting your issue. Nevertheless, the dark mode does not mean a report with black background is going to be generated.

Dark_mode stands for using the bootstrap 'flatly' theme (https://bootswatch.com/flatly/), which in this case and based upon Ydata-profiling code base, only the headers are expected to change in colors.

The theme dark does not exist. Instead bootstrap themes should be considered - https://docs.profiling.ydata.ai/latest/features/custom_reports/#customizing-the-reports-theme.

I'll assume this is a feature request. Nevertheless we won't be prioritizing it for the time being, unless it gets upvoted by the community.