Is it possible to overlay 2 graphs?

I am using grafana 7.1.5 on windows 10.

Hi all, my query returns 3 columns: one for the x axis, and 2 for the Y axis.
I would like to overlay them like in the image below.

image

I have been trying with the normal graph and with multistat, but was not able to do this. Is this possible?

Thank you!

Yes, it is.

This is an 8.2 example with the new Time Series panel which supports more than 2 y-axis: Grafana

I guess you are using the old Graph panel and here are the docs for multiple y-axes:

1 Like

thank you very much for your kind answer. we just updated grafana so will look into it. Do I have to run the query multiple times (A, B C, etc…) for each result or can I have a single query that returns the values for all graphs? it is a slow query that takes several seconds to complete and would be cool if i could run it only once…

Moreover, i see that it is a time graph… is this possible for a table graph too? I do not have time in my X axis.

You can run a query and reuse the result in multiple graphs. Choose the --dashboard-- option in the Data source dropdown:

What’s a table graph? Do you mean a bar chart like in your example above?

If you mean a bar chart, then yes. An example below, using a series override I moved the y-axis to the right for the Github stars series for this bar chart on our demo site: Grafana

Further to Daniel’s reply re: 2 axis (albeit on a time series), this screenshot may be helpful. It shows how one can use overrides to put the output of query B (memory) on the right axis.

Hi @grant2 , Is it possible to overlay the results of the query in the same graph?

Example: I want to overlay #1 with any of the others. This is to compare the performance for example.

Hi @diegonavea

  1. What is your datasource?
  2. Is the query result that corresponds to #1 on your screen mockup something that never changes (e.g. 1 year from now, you will still want to display that same dataset as an overlay)? Or is it more like a moving average?

In general, with the right query structure, you should be able to obtain what you want.