Data Visualization
Диаграмма сравнения цели и факта с линиями целей, фактическими значениями и диапазонами сравнения
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/bullet-chart' \
-H 'Content-Type: application/json' \
-d '{"bulletData":"JSON format example:\n[{"title": "Sales Completion Rate", "subtitle": "2024 Q1", "value": 85, "target": 100, "ranges": {"poor": 60, "satisfactory": 80, "good": 95, "excellent": 100}, "unit": "%", "format": "percentage"},\n{"title": "Customer Satisfaction", "subtitle": "This Month Survey", "value": 4.2, "target": 4.5, "ranges": {"poor": 3.0, "satisfactory": 3.8, "good": 4.3, "excellent": 4.8}, "unit": "points", "format": "number"}]","chartTitle":"Performance Dashboard","orientation":"horizontal","showLabels":true,"showGrid":false,"colorScheme":"blue","animationDuration":"1000"}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/bullet-chart| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| bulletData | textarea | Да | Данные пуль-диаграммы в формате JSON, включая заголовки, значения, цели и диапазоны |
| chartTitle | text | Нет | Основной заголовок пуль-диаграммы |
| orientation | select | Нет | — |
| showLabels | checkbox | Нет | Отображать ли метки значений |
| showGrid | checkbox | Нет | Отображать ли линии фоновой сетки |
| colorScheme | select | Нет | — |
| animationDuration | text | Нет | Длительность анимации в миллисекундах |
HTML-результат
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-bullet-chart": {
"name": "bullet-chart",
"description": "Диаграмма сравнения цели и факта с линиями целей, фактическими значениями и диапазонами сравнения",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=bullet-chart",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "bullet-chart",
"arguments": {
"bulletData": "JSON format example:\n[{"title": "Sales Completion Rate", "subtitle": "2024 Q1", "value": 85, "target": 100, "ranges": {"poor": 60, "satisfactory": 80, "good": 95, "excellent": 100}, "unit": "%", "format": "percentage"},\n{"title": "Customer Satisfaction", "subtitle": "This Month Survey", "value": 4.2, "target": 4.5, "ranges": {"poor": 3.0, "satisfactory": 3.8, "good": 4.3, "excellent": 4.8}, "unit": "points", "format": "number"}]",
"chartTitle": "Performance Dashboard",
"orientation": "horizontal",
"showLabels": true,
"showGrid": false,
"colorScheme": "blue",
"animationDuration": "1000"
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]