You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe there's a more elegant way to do this with some d3 primitive?...
Removing axis ticks
To get gridlines without tick stubs, I had to inspect every rendered line and hide the short ones:
for (const tick of svg.querySelectorAll('.ts-chart__axes line')) {
const dx = Number(tick.getAttribute('x2')) - Number(tick.getAttribute('x1'))
const dy = Number(tick.getAttribute('y2')) - Number(tick.getAttribute('y1'))
if (Math.hypot(dx, dy) <= 4.1) {
tick.style.visibility = 'hidden'
}
}
I don't think axis/grid stuff is super exposed yet?..
Responsive axis labels
I really like a feature of Tremor's where they adapt smaller UI's to hide labels when they start to get squished together:
Wide container view
Narrow container view
Container queries make a great case for this, so that's what I used. Feels like a nice default for a lot of timescale charts, but maybe that's not something to be too opinionated about.
@container tremor-chart (max-width: 639px) {
.chart .ts-chart__axes
text[data-ts-key^='x-tick-label']
:not(:nth-child(1 of [data-ts-key^='x-tick-label']))
:not(:nth-last-child(1 of [data-ts-key^='x-tick-label'])) {
display: none;
}
}
Fixed tooltip placement
Another thing I was trying to emulate that Tremor does design-wise that feels tasteful is anchoring tooltips along an axis.
This makes sense from a design standpoint but just feels annoying to have to do this magic feeling y1: stackStart thing combined with some data transformation and get it just right, felt like there were lots of easy ways to screw this up where types check but charts look wonky.
The really common charts (stacked + grouped bars) require the users to own both the data transform and the geometry. Not sure what the solution is, just pointing out a place that took a little more care.
Trying to not to prescribe solutions and just call out some overall papercuts I noticed. Overall was very pleased with how much I could do and how quickly agents could pick up on and turn this stuff into all sorts of weird/cool visualizations.
Loving the library!
I rebuilt 21 Tremor tooltip examples with TanStack Charts + React. The tooltip API itself worked well for content:
renderTooltipBody,defaultBody, custom anchors, and portals were all solid.There were a couple things that I ran into that maybe belong in userland, maybe could make for some nice features:
Background highlights
One thing I wanted to replicate was using a background highlight to show an active bar mark, instead of a circular mark that appears in the bar
It took some hacking, but was possible:
Maybe there's a more elegant way to do this with some d3 primitive?...
Removing axis ticks
To get gridlines without tick stubs, I had to inspect every rendered line and hide the short ones:
I don't think axis/grid stuff is super exposed yet?..
Responsive axis labels
I really like a feature of Tremor's where they adapt smaller UI's to hide labels when they start to get squished together:
Container queries make a great case for this, so that's what I used. Feels like a nice default for a lot of timescale charts, but maybe that's not something to be too opinionated about.
Fixed tooltip placement
Another thing I was trying to emulate that Tremor does design-wise that feels tasteful is anchoring tooltips along an axis.
CleanShot.2026-07-30.at.22.48.36.mp4
This was pretty doable, but had to be calculated:
Stacked/dodged bars are a little boilerplate-y
This makes sense from a design standpoint but just feels annoying to have to do this magic feeling
y1: stackStartthing combined with some data transformation and get it just right, felt like there were lots of easy ways to screw this up where types check but charts look wonky.Grouped bars aren't too bad:
The really common charts (stacked + grouped bars) require the users to own both the data transform and the geometry. Not sure what the solution is, just pointing out a place that took a little more care.
Trying to not to prescribe solutions and just call out some overall papercuts I noticed. Overall was very pleased with how much I could do and how quickly agents could pick up on and turn this stuff into all sorts of weird/cool visualizations.