I want to plot two lines, one for date 2018-08-01, one for 2018-08-02 in the same visualization. The lines will be plotted against 'A' and 'B' on the X axis.
I want the user of the dashboard to be able to provide these as input (filter inputs).
I think something like this will get you pretty close to what you want.
It's a bit more of a natural step to use the date in the X-Axis, because Y axis is usually for metric aggregations like sum or count, and the Y-axis is usually for bucket aggregations like date histogram.
I made a bunch of test data using ('A', 5, 2017-08-01) as an example. I call the first field "code", the second field "scans" and the third field "date". Then I created a test index with a bunch of documents like:
POST /mytest/doc
{
"code": "B",
"date": "2017-08-01",
"scans": 10
}
Using Kibana 6.2.2, I create a line chart visualization to show a sum metric of all the scans bucketed by date:
So, if I want to change the code filter to add C or have it just show A, then I can click the pencil icon to edit the filter and adjust it.
The icons on the filter "pill" also allow me to toggle the filter off, invert it, or pin it so it sticks and gets carried over to other visualizations and dashboards
One more thing I want to share. In Kibana 6.1.0, an experimental visualization called input controls was released that allows an easy way to make filters that choose from items in a terms aggregation and it will affect other visualizations in the dashboard.
I can create an input control visualization like this:
Now the box on the right has a drop-down which allows me to create easy filters that affect the line chart visualization. These filters can also be toggled an pinned just like any other filter:
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.