feat(mcp): add series_limit to generate_chart XY config#40307
Merged
aminghadersohi merged 2 commits intoMay 22, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #40307 +/- ##
==========================================
- Coverage 64.13% 64.13% -0.01%
==========================================
Files 2592 2592
Lines 138907 138912 +5
Branches 32217 32218 +1
==========================================
+ Hits 89085 89087 +2
- Misses 48290 48293 +3
Partials 1532 1532
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c3a7704 to
f658a82
Compare
Antonio-RiveroMartnez
approved these changes
May 21, 2026
Add series_limit parameter to XYChartConfig so callers can control how many distinct series (group_by values) the chart renders. When set, the value is forwarded as form_data["series_limit"], which Superset's echarts timeseries plugins interpret to cap the number of rendered series lines/bars.
Extract row/series limit assignment into a private helper to keep map_xy_config within the McCabe complexity threshold, removing the noqa: C901 suppression. Move series_limit schema tests out of TestRowLimit and into a dedicated TestSeriesLimit class. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e25e5f8 to
563989a
Compare
563989a to
c256076
Compare
Contributor
|
Bito Automatic Review Skipped – PR Already Merged |
sha174n
pushed a commit
to sha174n/superset
that referenced
this pull request
May 22, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Adds a
series_limitparameter toXYChartConfigin thegenerate_chartMCP tool.When
group_byis set on an XY chart (line, bar, area, scatter), users can now control the maximum number of distinct series rendered by specifyingseries_limit. The value is forwarded asform_data["series_limit"], which Superset's echarts timeseries plugins use to cap the number of rendered series lines/bars.Usage example:
{ "dataset_id": 123, "config": { "chart_type": "xy", "x": {"name": "order_date"}, "y": [{"name": "revenue", "aggregate": "SUM"}], "group_by": [{"name": "region"}], "kind": "line", "series_limit": 10 } }When
series_limitis not set (defaultNone), the field is omitted from form_data and Superset applies no series cap.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — backend schema change only.
TESTING INSTRUCTIONS
generate_chartwith an XY config that includesgroup_byandseries_limit: 5form_datacontains"series_limit": 5series_limit— verifyform_datadoes not containseries_limitADDITIONAL INFORMATION