bito-code-review[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4939303702
<!-- Bito Reply -->
The docstring in `superset/mcp_service/chart/tool/generate_chart.py` indeed
contains a contradiction regarding `mixed_timeseries`. While the docstring
lists `mixed_timeseries` as a valid `chart_type` in the bulleted list, the
introductory text claims there are "exactly 7 valid chart_type values" and
explicitly states that `mixed_timeseries` is NOT a valid `chart_type` value,
which is confusing.
To resolve this, the docstring should be updated to clarify that
`mixed_timeseries` IS a valid `chart_type` value, consistent with its inclusion
in the list and the `ChartConfig` discriminated union. The introductory text
should be corrected to reflect the actual list of valid types.
**superset/mcp_service/chart/tool/generate_chart.py**
```
IMPORTANT: The 'chart_type' field in the config is a DISCRIMINATOR that
determines
which chart configuration schema to use. It MUST be included and MUST
match the
other fields in your configuration. There are valid chart_type values:
- chart_type='xy' for charts with x and y axes (line, bar, area,
scatter).
Required fields: y (x is optional — defaults to dataset's primary
datetime column). Use 'kind' to pick line/bar/area/scatter
(default kind='line').
- chart_type='table' for tabular visualizations.
Required fields: columns
- chart_type='pie' for pie/donut charts.
Required fields: dimension, metric
- chart_type='pivot_table' for pivot table visualizations.
Required fields: rows, metrics (columns is optional, for cross-tabs)
- chart_type='mixed_timeseries' for dual-axis time-series charts.
Required fields: x, y (primary metrics), y_secondary (secondary
metrics)
- chart_type='handlebars' for custom template-based visualizations.
Required fields: handlebars_template
- chart_type='big_number' for single KPI metric displays.
Required fields: metric
```
--
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]