Hi,
as a beginner on Kibana this question might be silly, but I cannot get across it:
I would like to add a stacked bar graph to my dashboard.
Two Y-axis:
sum of index abc field1, where field2="1"
sum of index abc field1, where field2="2"
Sum of abc field1 is easy. But how can I accomplish the where conditions?
The page filter (upper left corner) would solve for one Y-axis, but not for my request of two Y-Axis.
Using Kibana 7.10 OSS.
An example on how to use it in the GUI would be appreciated.
If an advanced JSON is necessary, please advise on how to integrate it into the GUI.
This can be done, i guess, using a filter aggregation
You can add multiple filters, each one with a custom label, but in X- axis
Is this something that can help you ?
Or may be TSVB builder is more suitable for your use case with filters on Y-axis
Hi Yassine,
thanks for your quick reply. I think, your solution is not sufficient, as it will apply to both Y-Axis.
But I need to distinguish between both.
Can you explain in more detail please?
I would not expect you to visualize this data using two Y-axes: it distorts the relationship between A and B. The approach that @ylasri suggested is what I would use as well.
You can use TSVB to get two Y axes with separate filters. You can create a second series using the + button next to the name of the series. Each one can take a custom filter and have its own axis. But again, I do not recommend this based on your description of the problem.
Hi wylie,
yes, it does make sense. I need to see on a single graph two options. This is not destorting the relationship between A and B, as the data are closely related.
What is TSVB???
So you basically tell me a simple where condition cannot be integrated within vertical bar? I will have a look into TSVB.. will let you know next days.
Anyway,
Thanks, Wolfram
I can add a second Y-Axis with vertical bars as well... but I cannot achieve to have different sum-ups ... (well the where conditions makes the problem) ... sooo easy to solve with SQL.
The good news is that about a week ago, we merged the work needed to get a filtered metric into Lens. Filtered metrics will let you do 2 Y axes with separate filters. It is targeted for the next minor, which is 7.13
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.