aminghadersohi opened a new pull request, #40775:
URL: https://github.com/apache/superset/pull/40775

   ## Summary
   
   - Adds `aggregation` field to `BigNumberChartConfig` with options 
`LAST_VALUE`, `sum`, `mean`, `min`, `max`, `median`, `raw`
   - Wires the field into `map_big_number_config` so it is written into 
`form_data["aggregation"]` when set
   - Updates system-prompt guidance and chart type schema examples so the model 
can diagnose and fix Big Number with Trendline charts displaying only the last 
data point instead of a total
   - Adds unit tests for schema validation and form_data mapping with and 
without `aggregation`
   
   ## Context
   
   The Big Number with Trendline chart has a client-side `aggregation` field in 
`form_data` (separate from the SQL aggregate on the metric) that controls how 
the single displayed value is computed from the trendline data points. Options 
include Total (Sum), Last Value, Average, Min, Max, etc. The frontend defaults 
to `LAST_VALUE` when this field is absent. Previously `BigNumberChartConfig` 
did not model this field, so the MCP chatbot could not set or update it, 
causing charts to always show the last data point instead of a total when users 
asked for all-time totals.
   
   ## Testing
   
   Unit tests added in 
`tests/unit_tests/mcp_service/chart/test_big_number_chart.py`.


-- 
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]

Reply via email to