Question

How to get Pie Chart

  • 14 November 2016
  • 12 replies
  • 793 views

Hi,


Pie Charts seem to demonstrate this annoying characteristics that almost always ‘Label - Value’ is drawn beyond the Look’s visible area. (labels outside of visible area) .

It seems impossible to show values in so many cases. When switching to Label Type = “Legend”, you can never see values, just percentages (Legend cannot show values, only percentages).

Is there any option for Pie Charts to show ‘Values’ (not percentages) in legend ? Any chance to plot Label-Values Labels withing visible area of a look?


Rgds,

Matt


12 replies

Hi Matt,


What version of Looker are you running? In some of the newer versions you can switch the “Value Labels” option to be “Labels”, and then change the “Label Type” to something like “Label - Value”. You should then get something like the following chart:



Let us know if that helps.



  • Nate

Userlevel 1

@natenate - you don’t see labels disappearing off the top of your pie charts? It seems to happen to us all the time - any time a pie chart has any items with small fraction of the pie, those labels stack up at the top of the chart and can’t be seen either as a Look or in a dashboard.

Hi @apsmith! Thank you for bringing this to our attention – I will file this issue with engineering! Out of curiosity, what version of Looker are you running on?

HI Allegra,

All Looker releases have had this problem. It’s been there for ages and has never been fixed.

Looker are really getting a bad name on not being able to put labels on charts in a way that labels fit visible area of charts.

You can even go to your most recent release (learn.looker.com) and easily recreate it yourself.

Go to “Ecommerce->Orders” explore, pick “Orders ID” as dimension and “Count” as a measure. Limit to Top 50, see ‘Pie’ . You should see it straight away.


Userlevel 1

I emailed but to also note here - we have 4.4 (I believe) right now, but this problem has been there from when we started, around 3.40. I can think of several ways to fix this:



  • automatically resize everything so all the labels fit!

  • allow manual resizing of the pie chart so users can adjust how they like (there’s already a control to allow resizing a hole in the center of the pie chart)

  • rotate the chart (or allow manual rotation) so the small quantities are, say, on the left instead of at the top - this might help a bit

  • consolidate the smallest items (say anything under 2%) into an “Other” that is broken down separately somewhere.

Userlevel 2

Hi @apsmith,


Thanks for the feedback, I’ll loop in our engineering team about this!


Cheers,

Vincent

Hi Vincent,


In hindsight, it would have been better not to loop in Looker engineering team 😉 They seem to have chosen the worst solution: removing options for labeling of pie charts even further. At ver 4.X there was at least one workaround available to us (like “rotate the chart” suggested by apsmith on this thread). We used that a lot. Not most beautiful , but at least labels were there.


With one of recent releases (5.X , “Pie chart’s labels no longer display for every value if there is not enough room”), you seem to have removed that option. Now, most labels do not show at all, irrespective of slice size ordering.


Are there any ways to keep pie chart labeling as it was in 4.X ? Any tricks left ?

Cheers,

Matt

Userlevel 4

Hi Matt,


Thanks for your feedback, I’ve passed it on to our product team! This design choice was made to try and eliminate the problem with the labels cutting off, but I can definitely see how having those labels only in a hover rather than a lined label is problematic for you. As a workaround, the Legend Value Labels will show you all the values in the chart, listed on the right.


Best,

Molly

Hi Molly,



Thanks for the suggestion re “Legend Value Labels”. That option is of little use to us as it’s only able to show Label-Percent, while our business users need absolute values, not percentages.



Yes, this is even more important as more and more users want to distribute/share reports with non-users as PDFs, email jpgs.


I’ll appreciate sharing any feedback from the product team. Perhaps they would be able to share previous Pie Chart as a ‘custom visualization’ on your github repo ?

Rgds,

Matt

Userlevel 4

Thank you for these suggestions, Matt. I’ve passed both requests to our product team, for absolute values in legends and pie-charts in custom visualizations. A different visualization type for your dataset might provide a workaround, for now.


Best,

Molly

Hi Molly, Any chance your engineering team can , please, upload the old Pie Chart as ‘custom visualization’ into github? For example : https://github.com/looker/visualization-api-examples/tree/master/examples ( or wherever else you store unsupported charts ) ?

Hi Matt,


Thanks for feedback. We’re currently reworking our native chart offerings but haven’t begun work on pie charts yet. When we do we’ll be sure to consider this use case.


Unfortunately, we’re unable to share the code for this pie chart as a custom visualization. However, we’re launching a brand new Visualization Block Directory soon which will have more types of visualizations than the repo you shared in addition to a place to request new types from Looker partners.


Let me know if you have any other questions.


Andrew Wynn

Product @ Looker

Reply