Skip to content

bar chart support#2005

Open
gingerwizard wants to merge 1 commit intohyperdxio:mainfrom
gingerwizard:bar_chart
Open

bar chart support#2005
gingerwizard wants to merge 1 commit intohyperdxio:mainfrom
gingerwizard:bar_chart

Conversation

@gingerwizard
Copy link
Copy Markdown
Contributor

Summary

This PR introduces Bar Charts. Historically, bar charts were effectively bar charts over time series. This implements true bar charts where the x-axis can be any grouping key.

As a result of this, line/bar charts are now called "Time Series"

Screenshots or video

image

How to test locally or on Vercel

  1. Navigate to Chart Explorer.
  2. Build a bar chart - Demo Traces - Group by ServiceName

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

@gingerwizard is attempting to deploy a commit to the HyperDX Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 28, 2026

⚠️ No Changeset found

Latest commit: 5d7cbe2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

PR Review

  • ⚠️ groupBy validation uses !form.groupBy which won't catch groupBy = [] (empty array is truthy in JS) → Change to !form.groupBy || (Array.isArray(form.groupBy) && form.groupBy.length === 0) in ChartEditor/utils.ts:260

  • ⚠️ formatResponseForPieChart reused for bar chart data in DBBarChart.tsx:185 → Shared usage is fine if the format is identical, but consider extracting to a shared formatCategoricalChartData utility to avoid confusion for future maintainers

  • ℹ️ BarChartTooltip memo component missing displayName → Add BarChartTooltip.displayName = 'BarChartTooltip' for better React DevTools experience (minor)

Overall the implementation is solid, follows existing patterns (mirrors DBPieChart closely), and the enum/validation/routing additions are correct. The operator precedence in the updated validateChartForm condition is fine — the parens correctly wrap all three display types.

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.

1 participant