Kibana: Inconsistent pie chart labelling

Created on 14 Feb 2018  路  6Comments  路  Source: elastic/kibana

Kibana version: 6.1.1

Elasticsearch version: 6.1.1

Server OS version: Ubuntu 16.04.3 LTS

Browser version: Vivaldi 1.14.1077.41 (Stable channel) (64-bit)

Browser OS version: Linux

Original install method (e.g. download page, yum, from source, etc.): Docker pull

Description of the problem including expected versus actual behavior:
A slice in a pie chart is missing a label, but both of its neighbours have a label so I don't understand why it is missing a label.

Steps to reproduce:

  1. Create a pie chart
  2. Notice that some slices don't get a label.

This is a little odd looking. Once slice did not get a label when the slice to the "left" and the slice to the "right" _did_ get labels. The attached screenshot shows this problem.

Everything smaller than the "CFNetwork" slice did not get a label and I'm fine with that if Kibana considers them too small to label, but why did that slice _between_ "CFNetwork" and "Wget" fail to get labelled? I would expect that _all_ slices bigger than some cut-off should be labelled.

kibana_piechart_missing_label

ElasticCharts Pie Chart KibanaApp discuss enhancement

Most helpful comment

I agree that having every label show _could_ make the chart harder to read. I think that if labels are going to be omitted, there should be some sort of consistency. Arbitrarily skipping a slice in a range does not seem like the best way to me. If the pie has 10 slices and it is determined (somehow!) that only 6 can be rendered, I'd like to see the first 6 _consecutive_ slices labelled, to avoid this slice-skipping.

My screenshot was from a 10-slice pie with only one level of grouping - I don't think labelling every slice would have made it too busy/messy, in this case. Or at the very least, label the gold-ish slice instead of that purple-ish one to the right, and also skip all the ones smaller than it.

Maybe there should be a feature to let users choose one of:

  • n < #-of-slices, and that is how many will be labelled, in consecutive order from largest to smallest.
  • _force_ all slices to be labelled (with a warning that it could look ugly).
  • allow Kibana to determine the "nicest" labelling layout.

All 6 comments

I can reproduce this. However, I have to ask, is this desired behavior? Especially where a pie chart contains many slices? Personally, from a product management POV, I don't know if I want every label showing on a pie with several slices. I think I might at least want that option versus it being an arbitrary selection? But then we're not dealing with a bug, but a feature request here.

Take for example my repro steps below. Do I really want all the slices of the pie labeled? There is enough labels to give me a relevant size that I can then visually look at other slices not labeled and say "_I think that's approximately a 2 ... which with this busy chart is enough to make me click on it out of curiosity to see what is between wGet and CFNetwork_ ."

Put another way, if I want that fine grained detail on a busy chart, perhaps a pie chart isn't the best visualization? Or at least surface the value the slice represents through displaying the legend?

Here are my repro steps below, y'all can decide.

  • Kibana version: 6.1.3
  • Elasticsearch version: 6.1.3
  • Server OS version: ?
  • Browser version: Version 64.0.3282.167 (Official Build) (64-bit)
  • Browser OS version: WIndows 10
  1. vigate to https://demo.elastic.co
  2. Navigate to Visualize via the left menu bar
  3. Click on the pie chart "Apache2 browsers"
  4. In the editor sidebar, in the subnav bar for data visualizations, select "Options"
  5. Under label settings, click "Show Labels"
  6. Click the "Apply Changes" (editor render button)
  7. Indeed, not all labels

image

I agree that having every label show _could_ make the chart harder to read. I think that if labels are going to be omitted, there should be some sort of consistency. Arbitrarily skipping a slice in a range does not seem like the best way to me. If the pie has 10 slices and it is determined (somehow!) that only 6 can be rendered, I'd like to see the first 6 _consecutive_ slices labelled, to avoid this slice-skipping.

My screenshot was from a 10-slice pie with only one level of grouping - I don't think labelling every slice would have made it too busy/messy, in this case. Or at the very least, label the gold-ish slice instead of that purple-ish one to the right, and also skip all the ones smaller than it.

Maybe there should be a feature to let users choose one of:

  • n < #-of-slices, and that is how many will be labelled, in consecutive order from largest to smallest.
  • _force_ all slices to be labelled (with a warning that it could look ugly).
  • allow Kibana to determine the "nicest" labelling layout.

cc @monfera just for awareness, since you're working on the Elastic charts pie chart atm. This also look like it would be fixed once we switch over to elastic-charts for pie charts.

The new pie chart, under development and integration, plans to have these:

  • we're putting text _inside_ slices and sectors, where they can be made to fit
  • the rest would be _candidates_ for outside-linked annotations
  • a control for the maximum number of slices (sectors) to be labeled, up to around 50 or 60 which are already hard to justify from the viewpoint of data visualization principles and other constraints it'd mean (cropped or entirely missing text due to overflow, or unreadably small fonts)
  • the allocation order is that of the slice/sector angular size (well... the value that underlies it) so on the image, the gold one would receive a label ahead of the magenta (CFNetwork)
  • naturally, only the outer ring can get outside linked annotations
  • as the outer ring can be one on a sunburst, which is primarily split by an inner ring (or more), the sector sizes aren't usually monotonic in that case; ordering is global in that it seeks out the largest overall outer ring arcs to use up the limited linking resources

Of course, very numerous and/or long labels are going to overflow beyond the visible rectangle that contains the pie/donut/sunburst. Still, there's no current plan for an unlimited count of labels. Also, at least in the first iteration, it won't be an optimizing layout, but we may at some point add a rule "use up labels for the largest N sectors, but then carry on if there's leftover space for more"

I'll post here an example soon.

Here's the example for the above, showing allocation of links (inherently limited) according to their size, no matter where they are on the ring. It also shows text fill where it fits, or where linked text would cause problems (inner circle).
image

The "new" pie visualization which will enhance chart labelling is being developed on https://github.com/elastic/elastic-charts/issues/84.

Was this page helpful?
0 / 5 - 0 ratings