Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Idea] Multi line charts support with multiple quries #480

Closed
eslamodeh opened this issue Sep 1, 2024 · 1 comment
Closed

[Idea] Multi line charts support with multiple quries #480

eslamodeh opened this issue Sep 1, 2024 · 1 comment

Comments

@eslamodeh
Copy link

Hello,

Is it possible to merge multiple line charts to one chart? Or for example, have two select query that would show two line charts?

@ankane
Copy link
Owner

ankane commented Sep 9, 2024

Hi @eslamodeh, you'd need to write it as a single query. For Postgres, you can use UNION ALL to combine two SELECT queries.

SELECT time_column_a AS time, 'Series A' AS series, numeric_column_a AS value FROM ...
UNION ALL
SELECT time_column_b AS time, 'Series B' AS series, numeric_column_b AS value FROM ...

@ankane ankane closed this as completed Sep 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants