select the_date, name, max(value) as max_value
from T
where the_date >= DATE(‘2023-08-01T07:00:00Z’) and the_date <= DATE(‘2023-09-01T06:59:59Z’)
group by the_date, name
order by the_date, name
In Bar chart properties I specified X Axis as “the_date”
In Postgres table the “the_date” column has type “DATE”.
Problem #1: currently the bar chart shows the x-axis labels as several identical values
What data do you see when running the same query in pgadmin?
select the_date,
name,
max(value) as max_value
from T
where the_date >= DATE('2023-08-01T07:00:00Z')
and the_date <= DATE('2023-09-01T06:59:59Z')
group by the_date, name
order by the_date, name
The X-axis labels on image in post above is different from mine.
I got labels like this instead of YYYY-MM-DD:
17:00:00.000 17:00:00.000 17:00:00.000 17:00:00.000
( this is problem #1 in my original post).
The problem #2 in my original post is present on image in post above:
every data point has individual X-label date even it belong to the same date.
I need to show values for the same date under the single X-axis date label (using different colors for different names).
I need something like left bar chart here:
I know how to assign the individual colors to names, but I do not know how combine them under the single common date.
I am having a problem in understanding the screenshot above.
I understand only that the 2nd transformation is applied:
“Grouping to matrix”.
On screenshot above I see under “Grouping to matrix”:
Column: metric
In my case I have the drop down list
value name_1
value name_2
value name_3
But it is not clear for me to how to remove the prefix “value”.
I want to clarify that the names list and the number of items in the names list is not fixed:
name_1
name_2
name_3
…
name_N
Hence the solution for removing prefix should not
ask user to
apply transformation for every individual name_N by clicking on every individual name
I found this workaround: assign the empty alias column name in SQL:
select the_date,
name,
max(value) as " "
from T
where the_date >= DATE(‘2023-08-01T07:00:00Z’)
and the_date <= DATE(‘2023-09-01T06:59:59Z’)
group by the_date, name
order by the_date, name