Skip to content

Conversation

@wrn14897
Copy link
Member

Ref: HDX-1607

Support ratio for both events and metrics charts

image

@changeset-bot
Copy link

changeset-bot bot commented Apr 16, 2025

🦋 Changeset detected

Latest commit: adbcf22

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/common-utils Patch
@hyperdx/app Patch
@hyperdx/api Patch

Not sure what this means? Click here to learn what changesets are.

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

const isRatio =
config.seriesReturnType === 'ratio' &&
resultSets[0].meta?.length === 3;
return isRatio ? computeResultSetRatio(resultSets[0]) : resultSets[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this okay? computeResultSetRatio could throw but I don't see a try catch in this hook

Copy link
Member Author

Choose a reason for hiding this comment

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

that's intentional. the error shouldn't break the app anyway

@wrn14897 wrn14897 force-pushed the warren/implement-series-chart-ratio branch from cbf1020 to 4be63e4 Compare April 16, 2025 21:47
Copy link
Contributor

@knudtty knudtty left a comment

Choose a reason for hiding this comment

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

lgtm!

@vercel
Copy link

vercel bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyperdx-v2-oss-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 4:48am

@kodiakhq kodiakhq bot merged commit b16c8e1 into v2 Apr 17, 2025
6 checks passed
@kodiakhq kodiakhq bot deleted the warren/implement-series-chart-ratio branch April 17, 2025 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants