feat(workbenches): enhance chart interactivity#3790
Conversation
- Always enable area for better visualization - Add y-axis marker for single data point mode - Set crosshair line color in chart utils
Soffi AI SummaryThis PR improves the chart visualization in the Workbenches Usage component to handle edge cases and polish the appearance of line charts. Motivation: The existing line chart had two visual issues when dealing with limited data: (1) when only a single data point existed, there was no shaded area fill — only an isolated dot with no context — and (2) the crosshair line used an unthemed color, making it inconsistent with the design system. Key changes:
These changes make the workbench usage charts more informative and visually consistent across all data states. Commits
Updated: 2026-07-01 11:52 UTC |
Greptile SummaryThis PR enhances chart interactivity in the workbenches usage view with three small, focused changes to
Confidence Score: 4/5Safe to merge; changes are purely visual and self-contained within the workbenches usage charts. The logic is straightforward and low-risk. The one notable edge case — a zero-value single data point causing the y-axis marker to be invisible — is a minor visual gap rather than broken behaviour, and the rest of the chart still renders correctly in that state. assets/src/components/workbenches/WorkbenchesUsage.tsx — specifically the zero-value single-point marker rendering.
|
| Filename | Overview |
|---|---|
| assets/src/components/utils/charts.tsx | Adds a themed crosshair line color to the shared chart config using an existing design-token color. |
| assets/src/components/workbenches/WorkbenchesUsage.tsx | Always enables area fill, disables points universally, and adds a horizontal y-axis marker for single-data-point charts; minor edge case when the single value is 0. |
Reviews (1): Last reviewed commit: "feat(workbenches): enhance chart interac..." | Re-trigger Greptile
- Introduce `UsageLineSeries` type for chart data - Implement `singlePointAreaLayer` for enhanced single data point visualization - Adjust `layers` in `ResponsiveLine` to include custom area layer and improve rendering logic - Set `enableArea` conditionally based on `isSinglePoint` status
Updated crosshair line color
Line instead of a single point
Test Plan
Test environment: https://console.plrl-dev-aws.onplural.sh/
Checklist
Plural Flow: console