Skip to content

feat: Add metric widget to dashboard#1520

Open
PranshuSrivastava wants to merge 2 commits intolmnr-ai:devfrom
PranshuSrivastava:add-widget
Open

feat: Add metric widget to dashboard#1520
PranshuSrivastava wants to merge 2 commits intolmnr-ai:devfrom
PranshuSrivastava:add-widget

Conversation

@PranshuSrivastava
Copy link
Copy Markdown

@PranshuSrivastava PranshuSrivastava commented Mar 26, 2026

Add metric widget to dashboard to a specific metric such as total cost, total o/p tokens etc.
Fixes: #1499
Preview of the widget:
image


Note

Medium Risk
Introduces a new chart type and changes validation/schema to allow config.x to be optional, which could affect existing chart save/load paths if any code still assumes x is always present.

Overview
Adds a new ChartType.Metric that renders a single numeric KPI by summing the selected y column via a new MetricChart component, with empty-state handling.

Updates chart configuration/validation and export/persistence to make x optional for metric charts (UI validation, export dialog checks, and backend zod schema). Updates the dashboard editor to support metric charts by generating configs without dimensions, hiding dimension/limit/total controls, and emitting query structures with no dimensions while still applying the time filter behavior used for non-timeseries charts.

Written by Cursor Bugbot for commit 93b7e39. This will update automatically on new commits. Configure here.

Signed-off-by: PranshuSrivastava <iampranshu24@gmail.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 26, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Signed-off-by: PranshuSrivastava <iampranshu24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants