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

Lens: Series with same names of different layers not distinguishable #61966

Closed
flash1293 opened this issue Mar 31, 2020 · 11 comments · Fixed by #140314
Closed

Lens: Series with same names of different layers not distinguishable #61966

flash1293 opened this issue Mar 31, 2020 · 11 comments · Fixed by #140314
Assignees
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@flash1293
Copy link
Contributor

When creating an xy chart with multiple layers and split series which map to the same name (e.g. because a terms agg is used and both layers return the same terms), the chart is not indicating somehow which series belongs to which layer.

In the screenshot both layers produce jpg, css and png series, but they can't be mapped back to the datasource.

Screenshot 2020-03-31 at 11 49 52

A possible solution would be to allow to name a layer and prepend its name to the series name.

@flash1293 flash1293 added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Mar 31, 2020
@elasticmachine
Copy link
Contributor

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

@wylieconlon
Copy link
Contributor

@flash1293 the example you've given doesn't look like a useful visualization, because you've built 2 identical queries and are trying to visualize them. Is there a better example?

Regardless of the example, your request for better naming is totally reasonable, but I'm trying to understand how important it is to make a change here.

@flash1293
Copy link
Contributor Author

@wylieconlon I'm not sure how often this comes up in real-world scenarios. IMHO it's plausible though - when overlaying data from multiple sources in the same chart your serie names can collide very easily as you are very likely working within a single domain.

A fictional example:
I have web log data and auto detected events from a siem I want to correlate (think logs-* index pattern and security-events-* index pattern). I create two layers to see them over time overlayed. Then I want to drill down by country (of traffic and security events) and add a split series aggregation to both layers splitting by their respective iso encoded country fields. Now I'm getting series with the same name from both layers and I can't differentiate between them anymore.

@wylieconlon
Copy link
Contributor

Found a real-world example where I could compare the behavior with layers vs two y-axis:

Layers:

Screen Shot 2020-08-26 at 10 55 30 AM

Two Y-axis:

Screen Shot 2020-08-26 at 10 57 34 AM

@ghudgins
Copy link
Contributor

idea: name a layer and pre-append this to series

@flash1293
Copy link
Contributor Author

flash1293 commented Jul 11, 2022

+1 #136069

@gr0vity-dev
Copy link

Does any workaround for this exist?
I'm comfortable with exporting my dashboard, modifying the json and reimproting if necessary.

I have a cluster of 5 nodes that log the exact same metrics, except they have a custom "_node_name" tag attached to each log.
Here an example :
{ "_node_name" : "node1" , "valueA" : 1 , "valueB" : 2 , "valueC" :3 , .... }
{ "_node_name" : "node2" , "valueA" : 9 , "valueB" :8 , "valueC" :7 , .... }
...

In the first visualisation I plot "valueA" broken down by "_node_name"
In the second visualisation I plot "valueB" broken down by "_node_name"

@flash1293
Copy link
Contributor Author

flash1293 commented Sep 6, 2022

@MichaelMarcialis I started working on this but I realized I need design support. Could you assist with the following questions?

  • We talked about having a context menu per layer, but where should the user enter the layer name? Have a "Set layer name" action in the context menu which opens a modal? Something else?
  • Where to show the layer name in the UI? I don't immediately see a good place for it:

Screenshot 2022-09-06 at 16 49 32

@MichaelMarcialis
Copy link
Contributor

MichaelMarcialis commented Sep 7, 2022

@flash1293: Forgive me, as this is the first time I'm seeing this issue and likely don't have the full history of the decisions made. Out of curiosity, why was it determined that the solution to this issue should be to allow users to add a custom name to the visualization layers? Instead, could we simply use the related dimension's name as the string used to prepend/append to the duplicative terms to better identify where they originating from? I imagine this would be a much lighter lift on the engineering side and also requires less work on the part of the user.

So given your original example, could we not simply use the names provided to the breakdown dimensions to prepend/append to the duplicative terms?

image

@flash1293
Copy link
Contributor Author

Good idea @MichaelMarcialis - Would you imagine this as a setting of the breakdown dimension or an automatic thing as soon as there are multiple layers using breakdowns?

@MichaelMarcialis
Copy link
Contributor

Good idea @MichaelMarcialis - Would you imagine this as a setting of the breakdown dimension or an automatic thing as soon as there are multiple layers using breakdowns?

My first instinct is to say that applying the prepend/append automatically as soon as multiple layer breakdowns are in play is probably the most user-friendly approach. However, I'll defer to you and @ghudgins if there are some cases that I'm not considering where it wouldn't be ideal.

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:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants