Skip to content

feat(analytics): add single value simple chart [MA-3730] #2064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Apr 4, 2025

Conversation

portikM
Copy link
Member

@portikM portikM commented Mar 27, 2025

Summary

Addresses: https://konghq.atlassian.net/browse/MA-3730

Adds SingleValue simple chart, allows it to be used in dashboard renderer

Demo: https://www.loom.com/share/2e13cf753a074640a45a3ea061bc8eb1?sid=885a0cb2-9322-4206-aed8-0285f114d314

@portikM portikM self-assigned this Mar 27, 2025
decimalPoints: {
type: 'number',
},
syntheticsDataKey,
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like this chart accepts a synthetics data key; I think you can remove this line until we decide that it actually needs one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this file have changes?

Copy link
Member Author

Choose a reason for hiding this comment

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

pnpm stylelint:fix command

@portikM portikM marked this pull request as ready for review March 28, 2025 17:27
@portikM portikM requested review from a team as code owners March 28, 2025 17:27
},
})

const record = computed((): AnalyticsExploreRecord => props.data.data[0])
Copy link
Member Author

Choose a reason for hiding this comment

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

@adorack @filipgutica is my logic correct here in the sense that we only need the first record here? Explore queries without group by only return 1 event but asking in case I'm missing something here

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a fine assumption.

Copy link
Contributor

Choose a reason for hiding this comment

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

May be it would be useful to throw a console warning if sigle value is being used with an explore result that has more than one record?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call, added a console.warn in onMounted

@portikM portikM force-pushed the feat/ma-3730-single-value-chart branch from 8dc8765 to e4322ab Compare March 28, 2025 20:59
Copy link
Contributor

@filipgutica filipgutica left a comment

Choose a reason for hiding this comment

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

Just a comment

@portikM portikM enabled auto-merge (squash) April 4, 2025 17:22
@portikM portikM merged commit 2cc0bf3 into main Apr 4, 2025
29 checks passed
@portikM portikM deleted the feat/ma-3730-single-value-chart branch April 4, 2025 17:38
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.

4 participants