How to add value to legend in pie chart

eric2000
eric2000 Member
edited February 11, 2022 in Analytics #1
<p>In pie chart, I want to add the values in legend instead of in or next to Pie chart. how to do it?</p>
<p> </p>
<p>Attached please find the example.</p>
<p> </p>
<p>Thanks in advance</p>

Comments

  • Meaning you'd like to see:<br><br>HB1, 10%, 1<br>HB2, 30%, 3<br>HB3, 30%, 3<br>HB4, 30%, 3<br><br>in the legend?
    Warning No formatter is installed for the format ipb
  • <p>Thanks for your reply.</p>
    <p>I want </p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB1, 10%, 1</span><br><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB2, 30%, 3</span><br><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB3, 30%, 3</span><br><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB4, 30%, 3</span></p>
    <p> </p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">It'll be better if we can choose different font for each values in </span><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB1, 10%, 1</span></p>
  • Okay. We can figure out the values to fill in the legend. I'm assuming you don't want to show the values on the slices because it shrinks the pie size? If that's not it, I think we can do this easier by copying the slice labels and then hiding them and using their value in the legend. If you're worried about the size of the pie, we'll just have to compute the values ourselves, which is not a big deal. Let me know.
    Warning No formatter is installed for the format ipb
  • <p>Thanks for your reply.</p>
    <p>I like to put the percentage in/out pie and value in legend. like</p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB1 (1)</span><br><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB2 (3)</span><br><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB3 (3)</span><br><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HB4 (3)</span></p>
    <p> </p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">HBx is legend and (x) is value(Number). y% will live inside or next to pie.</span></p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Any script will be appreciated.</span></p>
  • Take a look at this design. I added " (value)" to the category series in the chart to make room in the legend label for the actual value. In the chart script, I grab the category and slice values and use those in the legend script to replace the "value" portion of the label with the actual numerical value. Hope this helps. Let me know if you have questions.
    Warning No formatter is installed for the format ipb
  • <p>It's working nicely. Thank you very much.</p>
  • You're welcome. Glad to help. Let us know whenever you have questions! :)
    Warning No formatter is installed for the format ipb