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.

labelOffset and legendSize

See original GitHub issue

The doc says:

A value that determines how far the label is from the symbol in each legend item. Default set to 10px.

But I think there is a problem, here are screenshots:

capture d ecran 2017-11-20 a 17 33 22 capture d ecran 2017-11-20 a 17 33 32

The code used to generate the legend:

legendSize()
.title(legendTitle.charAt(0).toUpperCase() + legendTitle.slice(1))
.scale(reportScale) // a quantitative scale with two values
.shape('line')
.shapePadding(10)
.shapeWidth(2)
.labelOffset(5)
.labelFormat('.0f')
.labelAlign('start')
.labels(({ i, domain }) => domain[i])
.orient('horizontal')

Also I set the font size to 11px in css.

Am I missing something?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
susielucommented, Dec 5, 2017

Hey there @Lacroute a fix is in on v2.25.1 let me know if you have any problems with it.

0reactions
existe-dejacommented, Dec 18, 2017

Great! It works like a charm

Read more comments on GitHub >

github_iconTop Results From Across the Web

D3-Legend - Susie Lu
legendSize.labelOffset(number). A value that determines how far the label is from the symbol in each legend item. Default set to 10px. legendSize.
Read more >
Using d3-legend - Popular Blocks
labelOffset (10); svg.append("g") .attr("transform", "translate(200, ... sizeLegend = d3.legend.size() .scale(sizeScale) .shape("circle") .
Read more >
Legend | Vega-Lite
Default value: 160 . labelOffset, Number | ExprRef. The offset of the legend label. Default value: 4 . labelOverlap ...
Read more >
Problems with jqplot legend - charts - Stack Overflow
How to change legend size with matplotlib.pyplot ... JQPlot Y-Axis Label Offset · 0 · jqplot pie chart legend width.
Read more >
d3-svg-legend - UNPKG
28, labelOffset(offset: number): LegendColor;. 29, labelDelimiter(delimiter: string): LegendColor; ... 33, export interface LegendSize {.
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