From 74327aad4a39f2c70b5cf0957d55fc894c6eec7a Mon Sep 17 00:00:00 2001 From: Fabiana <30911746+fabclmnt@users.noreply.github.com> Date: Tue, 25 Mar 2025 10:55:04 -0700 Subject: [PATCH 1/7] fix: add html metrics support for compare --- .../report/presentation/core/scores.py | 5 +- .../flavours/html/templates/scores.html | 70 ++++++++++++++----- 2 files changed, 55 insertions(+), 20 deletions(-) diff --git a/src/ydata_profiling/report/presentation/core/scores.py b/src/ydata_profiling/report/presentation/core/scores.py index 62b001bff..6a962fca8 100644 --- a/src/ydata_profiling/report/presentation/core/scores.py +++ b/src/ydata_profiling/report/presentation/core/scores.py @@ -3,6 +3,7 @@ """ from typing import Any, Dict, List, Optional +from ydata_profiling.config import Style from ydata_profiling.report.presentation.core.item_renderer import ItemRenderer @@ -11,15 +12,15 @@ def __init__( self, items: List[Dict], overall_score: float, + style: Style, name: Optional[str], - caption: Optional[str], **kwargs ): content = { "items": items, "overall_score": overall_score, "name": name, - "caption": caption, + "style": style } super().__init__("scores", content=content, **kwargs) diff --git a/src/ydata_profiling/report/presentation/flavours/html/templates/scores.html b/src/ydata_profiling/report/presentation/flavours/html/templates/scores.html index f0bf8e895..90ad82cda 100644 --- a/src/ydata_profiling/report/presentation/flavours/html/templates/scores.html +++ b/src/ydata_profiling/report/presentation/flavours/html/templates/scores.html @@ -1,44 +1,78 @@