Hello everyone. I try create a dashboard(pie chart) with query to PostgresQL. I get simple table with tree columns
> select
> distinct public.message.model Model,
> public.message.rating Rating,
> count(*) "Total messages"
> from
> public.message
> where public.message.model <> '' and public.message.model = 'GPT-3'
> group by
> Rating, Model
> order by Model
> ;
The result of query is the table:
**Model: Rating: Total messages:**
GPT-3 0 20
GPT-3 -1 20
GPT-3 1 500
Dashboard settings
Value option set:
Show: “All values”
Fields: “Total messages”
Legend:
Legend values: “persent”, “value”
I get output legend like:
value persent
* (some color) GPT-3 Total messages 500 96%,
* (other color) GPT-3 Total messages 20 4%
* (some other color) GPT-3 Total messages 20 4%
But I want show:
value persent
- (some color) GPT-3 without rating Total messages 500 96%,
- (other color) GPT-3 positive Total messages 20 4%
- (some other color) GPT-3 negative Total messages 20 4%
In DB table the field describe rating has numeric type: -1 value is negative, 1 is positive, 0 without rating