plot_polar_chart
Generate a polar area plot to visualize data relationships between specified labels and columns from Teradata tables for analytical insights.
Instructions
Function to generate a polar area plot for labels and columns. Columns mentioned in labels are used as labels and column is used to plot.
PARAMETERS: table_name: Required Argument. Specifies the name of the table to generate the donut plot. Types: str
labels:
Required Argument.
Specifies the labels to be used for the line plot.
Types: str
column:
Required Argument.
Specifies the column to be used for generating the line plot.
Types: str
RETURNS: dict
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes | ||
| labels | Yes | ||
| column | Yes |
Implementation Reference
- The core handler function for the 'plot_polar_chart' MCP tool. It validates inputs, queries the specified Teradata table using the provided labels and column, and delegates to get_plot_json_data to generate JSON data formatted for a polar area chart (using Chart.js polarArea type). This is the direct implementation of the tool logic.def handle_plot_polar_chart(conn: TeradataConnection, table_name: str, labels: str, column: str): """ Function to generate a polar area plot for labels and columns. Columns mentioned in labels are used as labels and column is used to plot. PARAMETERS: table_name: Required Argument. Specifies the name of the table to generate the donut plot. Types: str labels: Required Argument. Specifies the labels to be used for the line plot. Types: str column: Required Argument. Specifies the column to be used for generating the line plot. Types: str RETURNS: dict """ # Labels must be always a string which represents a column. if not isinstance(labels, str): raise ValueError("labels must be a string representing the column name for x-axis.") return get_plot_json_data(conn, table_name, labels, column, 'polar')