Skip to content

BQL Query charts - some tweaks #1060

Open
@ngoonee

Description

This simple query:-

SELECT year, last(balance)

(where last(balance) can be anything really, sum(cost(position)) etc.) doesn't produce a graph. This is probably because as the description states, the first column needs to be 'a date or a string', and the year isn't any of those.

Similarly months and/or quarters should be handled (my full query actually looks more like the below, but the simple query above is sufficient to show the issue).

SELECT
    QUARTER(date) as quarter, last(balance)
FROM
    date > 2006-12-31
WHERE
    account ~ 'Assets:Banking|Assets:Cash|Liabilities:CreditCards'
GROUP BY quarter
ORDER BY quarter DESC

Currently this doesn't show a line chart as expected, but since what it sees is a string it shows a starburst or treemap (not useful for this particular data set).

Side-note: feature suggestion on this - handling 3-columns IF one of the columns is a date and the other is a string may be possible. For example I think it should be quite common to have the first column being a date or date-like (quarter, month, year), the second column being an account name, and the last being some number (sum of costs, balance etc). Either a multi-line plot or (easier I think) multiple line plots, one for each 2nd column, would be useful here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions