Complete API documentation for data visualization operations, chart rendering, and interaction management.
Base URL: https://api.wia-standards.org/v1/visualization
Authentication: Bearer Token or API Key in header
Retrieve available chart types and configurations
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | string | optional | Filter by chart category (bar, line, pie, scatter, etc.) |
| limit | number | optional | Maximum number of results (default: 50) |
| offset | number | optional | Pagination offset (default: 0) |
Render a chart with provided data and configuration
| Field | Type | Required | Description |
|---|---|---|---|
| chart_type | string | required | Type of chart to render (bar, line, pie, etc.) |
| data | array | required | Data array for visualization |
| config | object | optional | Chart configuration options |
| width | number | optional | Chart width in pixels (default: 800) |
| height | number | optional | Chart height in pixels (default: 600) |
POST /charts/render
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"chart_type": "bar",
"data": [
{ "label": "Jan", "value": 65 },
{ "label": "Feb", "value": 78 },
{ "label": "Mar", "value": 90 }
],
"config": {
"title": "Monthly Sales",
"colors": ["#10B981", "#059669", "#34d399"],
"showLegend": true,
"animate": true
},
"width": 800,
"height": 600
}
Update existing chart with new data or configuration
Delete a previously rendered chart
Validate data format and structure before visualization
{
"data": [ ... ],
"expected_schema": {
"type": "tabular",
"columns": ["label", "value"],
"types": ["string", "number"]
}
}
Apply transformations to data (aggregation, filtering, sorting)
{
"data": [ ... ],
"transformations": [
{
"type": "filter",
"field": "value",
"operator": ">=",
"value": 50
},
{
"type": "sort",
"field": "value",
"order": "desc"
}
]
}
Connect to real-time data streams for live chart updates
wss://api.wia-standards.org/v1/visualization/stream
// Send authentication message after connection
{
"type": "auth",
"token": "YOUR_API_KEY"
}
// Subscribe to specific chart updates
{
"type": "subscribe",
"chart_id": "chart_abc123",
"interval": 1000 // Update interval in ms
}
const ws = new WebSocket('wss://api.wia-standards.org/v1/visualization/stream');
ws.onopen = () => {
// Authenticate
ws.send(JSON.stringify({
type: 'auth',
token: 'YOUR_API_KEY'
}));
// Subscribe to chart
ws.send(JSON.stringify({
type: 'subscribe',
chart_id: 'chart_abc123',
interval: 1000
}));
};
ws.onmessage = (event) => {
const message = JSON.parse(event.data);
if (message.type === 'data_update') {
updateChart(message.data);
}
};
Export chart to various formats (PNG, SVG, PDF, JSON)
| Field | Type | Description |
|---|---|---|
| format | string | Export format: png, svg, pdf, json |
| quality | number | Quality (0-100) for PNG export |
| width | number | Output width in pixels |
| height | number | Output height in pixels |
Get AI-powered chart type recommendations based on data characteristics
{
"data": [ ... ],
"intent": "compare_trends", // compare, distribution, correlation, composition
"preferences": {
"interactive": true,
"complexity": "medium"
}
}
import { WIAVisualization } from '@wia/visualization';
const viz = new WIAVisualization({
apiKey: 'YOUR_API_KEY',
baseUrl: 'https://api.wia-standards.org/v1/visualization'
});
// Render a chart
const chart = await viz.render({
type: 'bar',
data: [
{ label: 'A', value: 10 },
{ label: 'B', value: 20 }
],
config: {
title: 'Sample Chart',
colors: ['#10B981']
}
});
console.log(chart.renderUrl);
from wia_visualization import WIAVisualization
viz = WIAVisualization(api_key='YOUR_API_KEY')
# Render chart
chart = viz.render(
chart_type='bar',
data=[
{'label': 'A', 'value': 10},
{'label': 'B', 'value': 20}
],
config={
'title': 'Sample Chart',
'colors': ['#10B981']
}
)
print(chart.render_url)
Rate limit headers included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
For complete SDK documentation, examples, and tutorials, visit the Resources tab. Need help? Join our community on Discord or check out our GitHub repositories.