Making a graph with as Y axis the value of a field

I have a database with entries that are a as follows:

Each line has a field "productName", a field "date" and a field "price".

How can I draw a line graph which will give me in X axis the date and in Y axis the price and a line for every product.

In general how can we just choose what we want for our Y axis? what if I don't want to do any special metrics like "mean", "min", "max" and just want to plot the value of a field.

Generally speaking, in Kibana visualizations you would have to pick one of those metric values. But if you don't have multiple prices for a product within the time interval then max=min=mean=average. Have you tried a line chart this way? If you set the interval on your x-axis Date Histogram small enough it might show you every individual price?

The only other solution I can think of is the experimental Vega visualization introduced in 6.2.0. You can do pretty much anything you want with it, but you have to learn the syntax.

I think the best is to use mean since as you say, there is only one per date.

One bucket "Date histogram" and a sub-bucket " terms

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.