ankane / blazer

Business intelligence made simple
MIT License
4.5k stars 471 forks source link

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

Closed eslamodeh closed 6 days ago

eslamodeh commented 2 weeks ago

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 commented 6 days ago

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 ...