aminghadersohi commented on code in PR #38403:
URL: https://github.com/apache/superset/pull/38403#discussion_r2911808129
##########
superset/mcp_service/chart/chart_utils.py:
##########
@@ -916,12 +974,23 @@ def _mixed_timeseries_what(config:
MixedTimeseriesChartConfig) -> str:
return f"{primary} + {secondary}"
+def _big_number_chart_what(config: BigNumberChartConfig) -> str:
+ """Build the 'what' portion for a big number chart name."""
+ metric_label = (
+ config.metric.label or
f"{config.metric.aggregate}({config.metric.name})"
+ )
Review Comment:
Fixed — `_big_number_chart_what` now uses explicit if/elif/else: if
`config.metric.label` is set, use it; elif `config.metric.aggregate` is set,
use `aggregate(name)`; else fall back to just the column name. This avoids the
`None(name)` string.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]