I am looking for charting options where I can plot day (1-30 days) trend of current month and compare it with day trend of previous month.
In this case X axis won't be date but integer (i.e. day) and currently SuperSet doesn't allow to do so. Can we have that feature.
You can do something close to it with a distribution bar chart, though we should really add a non-timeseries line chart...
Thanks !!
However, I am looking to plot 3 day trends on same graph so that I can compare current month day trend with last month day trend and last year day trend.
I'd also welcome such a functionality.
However, in the meantime, you can emulate it by simply projecting the dates of previous periods into the current one.
This is an example for comparing different years (in PostgreSQL syntax):
Let's assume that timecol is your temporal column.
Then just create a calculated temporal column timecol_projected within superset's table definition that projects the dates of previous years into the current one:
timecol + (date_trunc('year',current_date) - date_trunc('year', timecol ))
Furthermore, you create a calculated column year which is groupable/filterable, e.g.:
to_char(auftrag_ende::date, 'IYYY')
Now you can create a Time Series Line Chart, using timecol_projected as Time Column and year as Group By and maybe Filter column.
The start date can then be chosen to any value before the beginning of the current year and can stay like this forever. No need to adjust anything when the year changes.
In your case, you should be able to adapt this approach fairly easily by projecting everything to the current day and selecting the data of this month, the last month via a calculated month column.
Include the last year's day trend, though, might be a bit more challenging, but I'm confident that with a bit more magic with calculated columns for year and/or year_month plus some custom WHERE condition, or with an entirely customized SQL query, it can be done in the fashion described above.
Hey Thanks !!
It is working. Month is also working as I created Year-Month as grouping value.
But certainly a feature "line chart for non-time-series data" should be added.
Heads up, my team is working on a generic x-y chart where you can pick your own x axis that does not have to be a time series and you can still plot multiple 'metrics' and perform 'group-bys'. It will not replace the current time series since that has more complex features like granularity and so forth.
any update?
@fabianmenges any update on the generic line chart?
We implemented it in #4185 and are running it internally. Not sure if we are still tyring to get it upstream, adding @jeffreythewang
I can rebase accordingly if we're committed to merging it in.
@mistercrunch thoughts? customers are asking for this...
Duplicate #6568
Most helpful comment
any update?