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

Stacked line charts incorrectly shows one term as 100% #29386

Closed
A-Hall opened this issue Jan 25, 2019 · 10 comments · Fixed by #96203
Closed

Stacked line charts incorrectly shows one term as 100% #29386

A-Hall opened this issue Jan 25, 2019 · 10 comments · Fixed by #96203
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Feature:XYAxis XY-Axis charts (bar, area, line) still valid? Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@A-Hall
Copy link
Member

A-Hall commented Jan 25, 2019

Kibana version: 6.5.3

Elasticsearch version: 6.5.3

Server OS version: Centos 7

Browser version: Chrome 71.0.3578.98

Browser OS version: Windows 10

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

Describe the bug: When you chose a stacked line graph, the line for one of the terms is drawn correctly, while the other is drawn incorrectly as 100%.

Steps to reproduce:

  1. Create a date histogram using a terms agg as a sub aggregation.

image

  1. Switch from bar to line in Chart Type
  2. Switch from normal to stacked in Mode

The true line is drawn incorrectly as 100%

Normal Mode:
image

Stacked Mode:
image

Expected behavior:

Similar to the bar version of the graph:

image

image

@A-Hall A-Hall added bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Jan 25, 2019
@timroes
Copy link
Contributor

timroes commented Jan 28, 2019

That's actually "expected behavior". Stacking line charts, (without enabling areas) usually doesn't make much sense in the terms of data visualizations. Stacking makes sure, that not all series are drawn from "the bottom" of the chart, but are drawn on top of the previous series (as it's pretty well shown in the bar chart). If you use lines, it doesn't really make sense to use that, because due to the lack of "filling" of the lines, it's pretty confusing, that the 2nd line is now drawn on top of the first line. But the outcome is perfectly fine. The output will always just be the line, that connects the top of the bars in the stacked bar chart.

I will close this since this is desired behavior, though we def will make sure in the new visual editor (#17076) that users can't shot themselves in their foot using senseless chart configurations.

@timroes timroes closed this as completed Jan 28, 2019
@emveee
Copy link

emveee commented Jan 28, 2019

The issue is not the stacked line chart but the normal line chart... It's acting like its stacked and not starting the lines from the bottom of the chart.

@timroes
Copy link
Contributor

timroes commented Jan 28, 2019

Sorry, I misread that. Reopening.

@timroes timroes reopened this Jan 28, 2019
@XavierRamosORGADATA
Copy link

The error is persistent in Version 7.5.1
There is a horizontal line drawn on 100%.

It appears on Visualization: Line -> Chart type: Line -> Mode: Stacked ->Y-axes -> Mode: Percentage

Moreover, if you switch Mode from Stacked to Normal, nothing happens, so there are no "Normal" Line Visualizations with y-axes Mode: Percentage.

normalline
stackedline

@XavierRamosORGADATA
Copy link

Hi @timroes, I was wondering if there is any update on this issue? This type of chart will allow us to see information in a very insightful way.

@moorcito
Copy link

moorcito commented May 11, 2020

Hi, we are in version 7.5.2 and also affected by this. Is there any new info about the status of this issue?

@timroes timroes added :KibanaApp/fix-it-week Feature:XYAxis XY-Axis charts (bar, area, line) still valid? Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Mar 11, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes
Copy link
Contributor

timroes commented Mar 11, 2021

@stratoula we should validate sometime if this is still valid with the elastic-charts implementation

@flash1293
Copy link
Contributor

This is still happening for elastic-charts, but it's more consistent now. If "percentage" is enabled, the series are always stacked. It think there are two approaches we can take:

  • Grey out the option in the config - if the referenced axis is "percentage", it's always stacked
  • Provide a non-stacked "percentage mode" in elastic-charts

I think the first option is better here.

@stratoula
Copy link
Contributor

Exactly as Joe said, I agree let's allow only stacked for the percentage mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Feature:XYAxis XY-Axis charts (bar, area, line) still valid? Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants