add_chart_highlight_zone
Add shaded vertical zones to Plotly charts to highlight time periods like crises or policy changes. Enhances figure with colored bands and optional labels.
Instructions
Add a shaded vertical highlight zone to a chart.
Highlights a time period with a colored band. Ideal for: COVID years, crisis periods, policy changes.
Returns: Enhanced figure dict
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"figure": "<figure>",
"x_start": "<x_start>",
"x_end": "<x_end>"
},
"name": "add_chart_highlight_zone"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x_end | Yes | End of zone | |
| figure | Yes | Plotly figure dict from create_chart() | |
| x_start | Yes | Start of zone | |
| fill_color | No | RGBA fill color | rgba(198, 40, 40, 0.1) |
| annotation_text | No | Optional label above the zone |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||