Skip to content

feat: bar charts - #39

Merged
benvinegar merged 4 commits into
benvinegar:mainfrom
chiubaca:feat/bar-chart
Feb 8, 2024
Merged

benvinegar merged 4 commits into
benvinegar:mainfrom
chiubaca:feat/bar-chart

Conversation

@chiubaca

@chiubaca chiubaca commented Feb 5, 2024 •

Copy link
Copy Markdown
Contributor

Resolves: #28

Notes:
Was slightly trickier than anticipated because because absolute positioning elements in a css table is much harder than with plain divs in a css grid. Down the line I do wonder if if its worth refactoring the table component be plain divs and css grid if the component gets more complex, would give a bit more css flexiblity but at the cost of good html semantics.

Demo: https://counterscale.chiubaca.workers.dev/dashboard

@chiubaca chiubaca changed the title Feat/bar chart for feat: bar charts Feb 5, 2024
@chiubaca
chiubaca marked this pull request as ready for review February 5, 2024 11:27
@benvinegar

benvinegar commented Feb 5, 2024 •

Copy link
Copy Markdown
Owner

Man that looks so much better (with some tiny style issues to be resolved). I'll poke at this sometime this week.

🙏

@benvinegar

Copy link
Copy Markdown
Owner

So I took a peek at this: I'd like to figure out how to achieve the result without adding empty table cells. Mostly for a11y; the markup should reflect the content.

I'm playing around with it now. We're also free to edit TableCell (these are copy/pasted components from shadcdn/ui).

@benvinegar
benvinegar merged commit ca533fb into benvinegar:main Feb 8, 2024
@benvinegar

Copy link
Copy Markdown
Owner

I merged your PR then re-did how the colors were applied to drop the extra <td> and instead use linear-gradienton the` element.

8af3767

@benvinegar

Copy link
Copy Markdown
Owner

Also added #42

@chiubaca

chiubaca commented Feb 8, 2024

Copy link
Copy Markdown
Contributor Author

So I took a peek at this: I'd like to figure out how to achieve the result without adding empty table cells. Mostly for a11y; the markup should reflect the content.

I'm playing around with it now. We're also free to edit TableCell (these are copy/pasted components from shadcdn/ui).

Aha, that was confusing me lots!

Nice, thanks for fixing and merging🎉

benvinegar added a commit that referenced this pull request Dec 20, 2024
* feat: implements bar charts

* fix hydration errors causing select to break

* fix: comment typo

---------

Co-authored-by: Ben Vinegar <2153+benvinegar@users.noreply.github.com>
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.

Add horizontal bar chart / visual indicator to card rows

2 participants