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.

Custom legend item tile size & legend item padding

See original GitHub issue

For some of our chart designs, we want to have legend element tiles that were lines rather than boxes - i.e. legend element tiles that look like this: screen shot 2015-02-26 at 2 00 55 pm

Also we want to be able to control the amount of space in between each legend element for more fine-grained control over how it is displayed.

So I want to add custom config options for these:

legend: {
    // amount of padding to put between each legend element
    padding: 5,
    // define custom height and width for the legend item tile
    item: {
        tile: {
            width: 15,
            height: 2

The default values for width and height would be the current legend item size.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

mvidailhetcommented, Jun 14, 2019

This useful configuration is not in the doc yet. That’s too bad! I just found it thanks to Google.

rogeriolinocommented, Jul 30, 2019

Item padding isn’t working when legend is ‘inset’:



Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to change C3 legend item tiles to be icons?
It turns out the way to do this and keep the colours is to do stuff to the .c3-legend-item-tile(s). Since they're rectangles you...
Read more >
legend.padding | highcharts API Reference
The legend is a box containing a symbol and name for each series item or point item in the chart. Each series (or...
Read more >
Legend in ReactJS Chart Control - Syncfusion
Legend Item Padding. You can control the spacing between the legend items by using the itemPadding option of the legend. The default value...
Read more >
Tips and Tricks for Working with Legends in ArcGIS Pro - Esri
Adjust columns: Add more columns until all the legend items fit. The text size for the legend doesn't change, but more columns are...
Read more >
Legend Tutorial - ZingChart
To add a legend, create a legend object. The default legend appears like so, with each legend item corresponding to a series from...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found