question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Label 'width' issues

See original GitHub issue
screen shot 2016-01-19 at 9 08 59 am
      axisX: {
        labelInterpolationFnc: function skipLabels(value, index) {
          return index % divider === 0 ? value : null;
        }
      },

So my axis labels are just 12-01 etc… “strings”. And then I use the function to prevent 30 of them from ruining the X-Axis.

But, the ‘calculated width’ of each label (set directly on the element) is very narrow (despite now there being tons of available room). Thus, they show up as in the screenshot.

Any thoughts on how to fix this?

(and for bonus points, the right side of my chart gets cut off once I use the label interpolation)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
rstudnercommented, Jan 19, 2016

I ended up with: .ct-label.ct-horizontal { white-space: nowrap; }

which seems to solve it 😃

is there a list of things like the above (or a list of functions like: labelInterpolationFnc?)

I don’t mind the github/irc/read the code life heh… just curious if i’m missing a link in the docs to ‘more’

0reactions
thomasqjohnscommented, Feb 22, 2019

I’m having the same problem. For some reason .ct-label.ct-horizontal { white-space: nowrap; } was working for months but recently stopped.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I control the width of a label tag? - Stack Overflow
Label is an inline element, it cannot have width value; in order to do this you need to put display:block or float:left ....
Read more >
How To Correct Misaligned Label Templates
Last week, we listed five main causes of misaligned label templates. This week, we'll teach you how to fix (and avoid) them for...
Read more >
How to Fix Misaligned Labels Templates?
Check your printer settings; Decrease the font size or reduce the amount of text; Make sure you are using the correct labels. 1....
Read more >
Label width · Issue #2179 · recharts/recharts - GitHub
The label is not visible if it is more than a certain length.
Read more >
Printing shipping label issues - Veeqo Help Center
Veeqo creates the labels in PDF format in the exactly the right size. Shipping label printing problems. Labels too small or big. Wrong...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found