Appearance
Pie Chart Widget
The Pie Chart Widget in ARMS is perfect for showing how values are distributed across categories. Use it to represent proportions such as traffic sources, user roles, or error types.
When to use
- Visualize category breakdowns
- Show relative proportions of segments (e.g. users by role)
- Highlight top contributors to a total value
- Display simple summaries at a glance
How to add a pie chart
Example:
sql
WITH
parseDateTimeBestEffort('{{filter.timeLimit.start}}') AS start_time,
parseDateTimeBestEffort('{{filter.timeLimit.end}}') AS end_time,
SELECT
DISTINCT ResourceAttributes['service.name'] as applicationName,
ROUND(SUM(toFloat64OrZero(SpanAttributes['gen_ai.usage.cost'])), 5) AS cost
FROM otel_traces
WHERE
SpanAttributes['gen_ai.operation.name'] != 'vectordb'
AND notEmpty(SpanAttributes['gen_ai.usage.cost'])
AND notEmpty(ResourceAttributes['service.name'])
AND StatusCode IN ('STATUS_CODE_OK', 'STATUS_CODE_UNSET', 'Ok', 'Unset')
AND Timestamp >= start_time AND Timestamp <= end_time
GROUP BY applicationName;Configuration options
- Customize colors
- Add paths for labels & values
TIP
Use dynamic bindings like {{filter.timeLimit.start}}, {{filter.timeLimit.end}} to make your chart respond to dashboard time filters.
Best practices
- Aggregate less-important categories into an "Other" group in SQL
- Use percent labels for quick at-a-glance insights
- Match colors with your product or brand theme for consistency