Group bar and line chart - Separate Line Configuration from Series

Example use case:
In one graph, show a grouped bar chart with sales performance each week this year vs each week last year. On top of that, show a line charting the weekly sales goals.

To implement this, I attach a week and year assignment to each sales record. I use the week value as the x-axis grouping and filter by a range of the last several weeks. Then I chart revenue on the y axis and choose the year assignment as an unaggregated series so I get separate bars for each year. Each sales record also knows about the relevant sales target for its week, so I can get the sales goal by performing a MAX aggregate on that column. I would like to have a configuration separate from series that lets me define an arbitrary aggregate with which to seed the line points.

It seems that the main technical wrinkle here would be that the underlying query is grouping by each value for the series (the year in my case). So which group's aggregate column gets used for the trend line? I think the only correct technical answer would be to chart n lines for the n bars generated by the series grouping. Perhaps it would be necessary to be able to configure which trend lines to actually render. Then I could choose to only display the sales goal line for this year if I didn't want to see the line for last year.

This would probably have to be a new bar graph type, since it's not clear how existing grouped bar + line graphs would get interpreted if suddenly I have to specify the line separately.

Alternatively, it might be more productive and powerful to allow overlaying two graphs in one card, possibly from multiple data sources. Maybe that's easier to maintain than creating specialized compositions with the constraint of getting all the data in one result set.

0 votes

· Last Updated

This discussion has been closed.