techniq / layerchart

Composable Svelte chart components to build a wide range of visualizations
https://www.layerchart.com
MIT License
546 stars 11 forks source link

Bar Chart features / examples #21

Open techniq opened 2 years ago

techniq commented 2 years ago

Examples

risalfajar commented 10 months ago

Could you also add an example of Grouped Bar Chart with Tooltip?

techniq commented 10 months ago

@risalfajar Yeah, this one is not as straight forward as it should be. Typically I will attach the "item group data" to each item as only one is currently selected with the current tooltip={{ mode: 'band' }} heuristics.

I'll likely either update createStackData to do automatically, or try to improve TooltipContext showTooltip() mode handling to better handle this

techniq commented 2 weeks ago

@risalfajar Sorry for such a long delay, but finally getting around to tackling this as part of the Simplified Charts PR

https://github.com/user-attachments/assets/ec73ec57-4c01-4e93-9e99-679dec315162

Still some work to go, but the new simplified <BarChart> will support group and/or stacking with tooltips, as well as rolling your own via <Chart> (which this video is using)