Skip to content
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

feat(components): gs-aggregate: add bar chart view #639

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

fengelniederhammer
Copy link
Collaborator

resolves #546

Summary

  • We decided to filter out null values in the bar chart for now. Maybe we'll include them later.
  • There is an attribute maxNumberOfBars that controls how many bars are shown. Maybe we can implement pagination or similar later.

(I added corresponding tasks to the parent epic)

Screenshot

With one field:
image

With two fields:
image

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

Copy link

vercel bot commented Jan 8, 2025

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

Name Status Preview Comments Updated (UTC)
dashboard-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 10:26am

Copy link
Contributor

github-actions bot commented Jan 8, 2025

This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog.

Note that this might contain changes that are on main, but not yet released.

Changelog:

0.11.5 (2025-01-09)

Features

  • components: gs-aggregate: add bar chart view (2ccb2a3), closes #546

Copy link
Collaborator

@JonasKellerer JonasKellerer left a comment

Choose a reason for hiding this comment

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

Looks nice.
Would it be possible, to also show the total of each stacked bar on the tooltip? Currently it shows each of the subentries. But we could also add this in another ticket.

components/src/preact/aggregatedData/aggregate.stories.tsx Outdated Show resolved Hide resolved
@@ -28,6 +29,7 @@ const aggregatePropsSchema = z.object({
pageSize: z.union([z.boolean(), z.number()]),
width: z.string(),
height: z.string(),
maxNumberOfBars: z.number(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to already name this to something that we dont have to change later on, when we have pagination? I imagine that this could be pageSizeBars, or something. But maybe this is misleading for now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can imagine that pagination would be a breaking change anyway, but I'm not sure. Also even with pagination, I wouldn't find maxNumberOfBars so bad.

But for now I would stick with this name. It's not clear whether we will introduce pagination -> let's have a non-confusing name for now.

@fengelniederhammer
Copy link
Collaborator Author

Would it be possible, to also show the total of each stacked bar on the tooltip?

I added it.

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.

Aggregated: add bar chart
2 participants