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
When my terminal is wide enough then the 15 intervals are correctly included below each bar.
But when the terminal to small for inline display, the then displayed legend just includes 14 intervals, i.e. the interval for the zeroth bar is missing.
I had the same issue and got it working by subtracting the height of the runes.
Unfortunately it seems this project is no longer maintained so here's what I changed locally:
if labelsRight {
for i, group := range table.Columns {
- c.GetBuffer().WriteRight(c.GetBuffer().Height-i, paddingX+1+chartWidth/c.RuneSize().Width, []rune(Fi(i)))
- c.GetBuffer().WriteRight(c.GetBuffer().Height-i, paddingX+4+chartWidth/c.RuneSize().Width, []rune(group))
+ c.GetBuffer().WriteRight(c.GetBuffer().Height-i-c.RuneSize().Height, paddingX+1+chartWidth/c.RuneSize().Width, []rune(Fi(i)))
+ c.GetBuffer().WriteRight(c.GetBuffer().Height-i-c.RuneSize().Height, paddingX+4+chartWidth/c.RuneSize().Width, []rune(group))
}
}
Example:
When my terminal is wide enough then the 15 intervals are correctly included below each bar.
But when the terminal to small for inline display, the then displayed legend just includes 14 intervals, i.e. the interval for the zeroth bar is missing.
That means the legend looks like this:
The inline display:
The text was updated successfully, but these errors were encountered: