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

   ## Summary
   - Rewrote `generate_chart_name()` to produce structured, descriptive chart 
names
   - Format: `[What] by [Dimension] – [Context]` with variants per chart type:
     - **Line/Area (no group_by):** "Revenue Over Time – Monthly"
     - **Aggregated (bar, line with group_by):** "Revenue by Product Category"
     - **Scatter:** "Income vs Age"
     - **Table (no aggregates):** "Orders Records" or "Product, Revenue Table"
     - **Table (with aggregates):** "Sum(Revenue) Summary"
   - Context portion includes time grain (Monthly, Weekly, etc.) and filter info
   - Names capped at 60 characters with smart truncation
   - Dataset name included when available (for table charts without aggregates)
   - Custom column labels are preferred over raw column names
   
   ## Testing Instructions
   1. Run unit tests: `pytest 
tests/unit_tests/mcp_service/chart/test_chart_utils.py::TestGenerateChartName 
-v`
   2. Start the MCP server and use `generate_chart` with `save_chart=True`
   3. Verify the auto-generated chart name follows the format above
   4. Try with different chart types (line, bar, scatter, table) and verify 
naming
   5. Provide a custom `chart_name` and verify it takes precedence over 
auto-generation


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