Is it possible to replicate the graph from Loki's "Explore" feature?

Hello everyone, I’m trying to recreate the exact same graph I get from “Explore” when using a Loki datasource, is it even possible? I can’t get the exact same result (I’ve got something similar but the “explore” one is still better than what I’ve done)

From explore there is an option to create or add to existing dashboard. did you try that?

The logs volume chart isnt exportable in that manner, unfortunately… what you can do is try to build your own dashboard panel using the same loki query. The query is here, where ${expr} is the loki query you got the log volume from https://github.com/grafana/grafana/blob/main/public/app/plugins/datasource/loki/datasource.ts#L202

If you make that a bar chart panel, you should be able to get something very close

Thank you for your answers!

Yes It’s what I’ve done, I found the query and tried to build the same graph around it but the explore one is still better :grin:. Thank you again for your answer!

No problem, and this isn’t a priority for the explore team right now but we added that request to the todo list for explore to dashboard, so it will be addressed whenever we decide to pick that up