Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent pie chart labelling #16746

Closed
SolomonShorser-OICR opened this issue Feb 14, 2018 · 7 comments · Fixed by #83929
Closed

Inconsistent pie chart labelling #16746

SolomonShorser-OICR opened this issue Feb 14, 2018 · 7 comments · Fixed by #83929
Assignees
Labels
discuss Feature:ElasticCharts Issues related to the elastic-charts library Feature:Pie Chart Pie chart visualization feature release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@SolomonShorser-OICR
Copy link

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

@Bargs Bargs added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) triage_needed labels Feb 14, 2018
@deanpeters
Copy link

deanpeters commented Feb 15, 2018

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

@SolomonShorser-OICR
Copy link
Author

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.

@timroes timroes added discuss Feature:Pie Chart Pie chart visualization feature labels Feb 16, 2018
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Sep 16, 2018
@timroes timroes added the Feature:ElasticCharts Issues related to the elastic-charts library label Feb 26, 2019
@timroes
Copy link
Contributor

timroes commented Sep 27, 2019

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.

@monfera
Copy link
Contributor

monfera commented Oct 1, 2019

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.

@monfera
Copy link
Contributor

monfera commented Oct 2, 2019

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

@lucabelluccini
Copy link
Contributor

The "new" pie visualization which will enhance chart labelling is being developed on elastic/elastic-charts#84.

@monfera monfera self-assigned this Nov 19, 2019
@monfera
Copy link
Contributor

monfera commented Dec 8, 2020

@nickofthyme can it be closed now, or could you please add it to a vislib replacement item if not yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:ElasticCharts Issues related to the elastic-charts library Feature:Pie Chart Pie chart visualization feature release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants