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

TSVB - timeseries graph stacking doesn't work when using calculation with negative values are filtered by terms #15543

Closed
Tracked by #178
nich07as opened this issue Dec 12, 2017 · 6 comments · Fixed by #31417
Assignees
Labels
enhancement New value added to drive a business result Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@nich07as
Copy link

Kibana version: 6.0.1

Elasticsearch version: 6.0.1

Server OS version: Centos7

Browser version: Chrome

Browser OS version: MacOS Sierra

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

Description of the problem including expected versus actual behavior:
The TSVB when drawing a graph on negative values; i.e. using calculation with params *-1; then filtered by terms; and the stack option is used; the value computation does not seem to honor the calculations.

Steps to reproduce:

  1. Create 2 series; first --> one positive value graph filtered by terms (any terms) with Top 2
  2. Create the second series --> negative value graph by calculate function with parameter named y; params.y > 0 ? params.y * -1 : 0 then filtered by terms (any terms) Top 2
  3. Observe the current graph; then change the series options to stacked; you'd see the numbers skewed towards positive.

Errors in browser console (if relevant): No errors but visuals are presenting data that's somewhat skewed.

Provide logs and/or server output (if relevant): No error.

@cjcenizal cjcenizal added Feature:TSVB TSVB (Time Series Visual Builder) Feature:Visualizations Generic visualization features (in case no more specific feature label is available) bug Fixes for quality problems that affect the customer experience labels Dec 12, 2017
@sio4
Copy link

sio4 commented Dec 12, 2017

Hi all,
Actually this issue was created by @nich07as after my question to him at Elastic On Seoul, anyway I need to explain some details and my opinion on this issue.

First, I think it is not a bug and all values are used for aggregation. (stacking, of lines) Anyway, it looks like negative, calculated, values are ignored; but in fact, the values are added to (stacked over) positive high values (so just the results are nearly 0, so no negative lines are there.)

See attached images:

stack-aggregation-001

: original graph with stack option "none"

stack-aggregation-002

: just "stacked" option for negative values --> it works as shown. (growth of negative area)

stack-aggregation-003

: "stacked" options for all series --> see darker shadow on area. it means, line and area for negative value covers positive lines and areas of stacking.

Yes, the final value of summation, means stacked, is near by zero. since the positive value and negative value on same document are mostly same length with different direction.

So negative value itself is working for stacking.

@sio4
Copy link

sio4 commented Dec 12, 2017

It's NOT a bug, anyway what I want to say is, and my feature request for this issue is:

I think we need some additional key for the stacking group.
I mean it is not positive to positive and negative to negative summation. I (maybe we) need to select stacking group so we can add (stack) line A and B as AB which has height of A+B, by tagging A and B as stacking group "ab", but C and D should not added to AB, but there is another stacking group CD with height of C+D, generated by tagging C and D as stacking group "cd". show my drawing:

stack-aggregation-005

Just separated group of stacking, and the key(name) of the stacking group. it makes us can draw this kind of graph on the same page(graph). (in my case, they are RX and TX of ports on network switch)

Sorry for my poor English, anyway the graph and drawing show something. :-)

@nich07as
Copy link
Author

@sio4 - I believe the values are correct but when stacking the charts; the plots are somewhat skewed. Just to clarify.

@sio4
Copy link

sio4 commented Dec 12, 2017

@nich07as see second graph. It shows stacking of negative values only and works well. And on 3rd graph, you can see dark purple area. It was generated with overwrapped blue area of negative values over existing red area of positive values. Means, stacking as up-up-down-down not up-up-up-up. So it is normal and works well with those data set.

The problem is we cannot just separate them as two sets of stacking. As RXs are on one group, TXs are on second group.

@sio4
Copy link

sio4 commented Dec 13, 2017

Since my expression in English is not enough, I draw some lines on the graph.

stack-aggregation-006

Stacking itself are working fine. but RXs are merged with TXs.

@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
@simianhacker simianhacker removed their assignment Feb 13, 2019
sulemanof added a commit to sulemanof/kibana that referenced this issue Feb 19, 2019
sulemanof added a commit to sulemanof/kibana that referenced this issue Feb 25, 2019
@timroes timroes added enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels Feb 26, 2019
@sidharthvijayakumar
Copy link

Do we have this feature in Kibana? I wanted to stack -ve values on the -ve Y-axis (4th quadrant ) but does not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants