feat(mcp): add aggregation field to BigNumberChartConfig for Big Number with Trendline#40775
Draft
aminghadersohi wants to merge 2 commits into
Draft
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…er with Trendline Adds the `aggregation` field to `BigNumberChartConfig` so the chatbot can read, diagnose, and update the aggregation method on Big Number with Trendline charts. When absent, the frontend defaults to LAST_VALUE (most recent data point); setting aggregation="sum" gives the all-time total. Updates system prompt guidance and chart type schema examples to help the model diagnose wrong values and avoid accidentally changing the viz_type when fixing aggregation.
…g.aggregation description
440c8c3 to
282383e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #40775 +/- ##
==========================================
- Coverage 64.19% 64.18% -0.01%
==========================================
Files 2666 2666
Lines 143991 143994 +3
Branches 33108 33109 +1
==========================================
+ Hits 92428 92429 +1
- Misses 49950 49952 +2
Partials 1613 1613
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aggregationfield toBigNumberChartConfigwith optionsLAST_VALUE,sum,mean,min,max,median,rawmap_big_number_configso it is written intoform_data["aggregation"]when setaggregationContext
The Big Number with Trendline chart has a client-side
aggregationfield inform_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 toLAST_VALUEwhen this field is absent. PreviouslyBigNumberChartConfigdid 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.