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.

legend format for pie chart

See original GitHub issue

Is there any attribute available to format legend values?

I am trying to show like " id + value " in legends.

screenshot from 2018-09-26 14-42-37

For sake of testing I tried like adding a string ‘hello’:

legends={[
                        {
                            legendFormat: (d)=>{ d+'hello'}
                        }
                    ]}

But the legends are getting overlapped on each other.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
jithinbalakrishnancommented, Mar 19, 2020

@plouc How to customize the legends ? The legend should display what is inside label property in data . is that possible ? “legendFormat” property is not working for me. can someone please help me on this

4reactions
plouccommented, Apr 11, 2019

@Milleo, there’s already an issue about this, https://github.com/plouc/nivo/issues/164, but didn’t had the time to look at it.

@fmturati, you can change the font-size using the theme property, like this:

theme={{
    legends: {
        text: {
            fontSize: 14,
        }
    }
}}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Add and format a chart legend - Microsoft Support
Right-click the legend, and then click Format Legend. In the Format Legend task pane, pick the options that you want. ... Tip: You...
Read more >
How do I move the legend position in a pie chart into ...
You can drag the legend into the pie. In the Format Legend dialog untick the box to "Show the legend without overlapping the...
Read more >
How to Edit Legend of a Pie Chart in Excel (3 Easy Methods)
At first, click the cell in the worksheet that you want to edit the legend. · Next, type a new text in the...
Read more >
Legend | Chart.js
Position of the legend. Options are: ... When using the 'chartArea' option the legend position is at the moment not configurable, it will...
Read more >
How To Add and Remove Legends In Excel Chart? - eduCBA
A Legend is a representation of legend keys or entries on the plotted area of a chart or graph, which are linked to...
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