Skip to content

feat(frontend): add option to unstack downloads per version #1101

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

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

Conversation

tylersayshi
Copy link
Contributor

@tylersayshi tylersayshi commented May 7, 2025

adds option to view stacked and unstacked downloads (keeping current defaults). Replicating the downloads chart for crates.io

stacked:
image

unstacked:
image

options on small screens:
image

Copy link

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this, it was really confusing

@crowlKats
Copy link
Collaborator

crowlKats commented May 8, 2025

this is intentional behaviour, and is common across other systems already (ie crates.io). a stacked graph makes sense for an aggregation set of data across different points, so this seems the right usecase

@KnorpelSenf
Copy link

ah dangit

@tylersayshi tylersayshi marked this pull request as draft May 8, 2025 16:43
@tylersayshi
Copy link
Contributor Author

this is intentional behaviour, and is common across other systems already (ie crates.io). a stacked graph makes sense for an aggregation set of data across different points, so this seems the right usecase

There's an option on crates.io to unstack the graph. Would you be ok with me changing this to add the dropdown option for stacked/unstacked here as well?

image

@crowlKats
Copy link
Collaborator

@tylersayshi yes that sounds good

@tylersayshi tylersayshi changed the title fix(frontend): unstack download charts feat(frontend): add option to unstack downloads per version May 9, 2025
@tylersayshi tylersayshi marked this pull request as ready for review May 9, 2025 05:59
@crowlKats
Copy link
Collaborator

maybe move the legend/index to the right, and have the selectors next to eachother?

Comment on lines 53 to +54
tooltip: {
items: {
padding: 0,
enabled: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removing items.padding was a result of seeing that it is not in the ApexOptions type. From what I can see in the chart, removing it had no visual impact either. Lastly, it is not in the docs: https://apexcharts.com/docs/options/tooltip/#items
so it seemed safe to remove along with using the return type

@tylersayshi
Copy link
Contributor Author

maybe move the legend/index to the right, and have the selectors next to eachother?

To clarify: Is this what you mean visually?

image

I'm having trouble positioning the legend this way with the toolbar like that so I may reach for custom styles to get that working if this is what you meant.

@tylersayshi
Copy link
Contributor Author

small breakpoint layout

image

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.

3 participants