3

I've got a view which shows download count and playback count (for musical works). This view may be filtered on time intervals, and is capable of returning downloads and playbacks for this time interval only.

Now, I'd like to generate an "overview" which simply will be the product of this view but with different time intervals. I'd like the resulting table to be something like:

when downloads playbacks last week 10 100 last month 50 287 last quarter 200 437 last year 1000 1836

Is there a way to achieve this without doing it as a specific module? Is there a module out there which is capable of collecting data from a view, putting it together and generate a table and possibly charts for that?

1

'I' can answer that very last part of your question about charts. The views integration of the charts module is a solution for that. Here is an intro about it from the charts community pages:

Anybody familiar with the views UI can use the charts module to create charts without coding PHP snippets, as one typically does when using the Charts API.

So site building knowledge is sufficient to create charts using Views, you don't have to be like an experienced Drupal developer (who probably would rather want to use the Charts API instead).

To be complete: I'm the new co-maintainer of the charts module ... Working on transforming the latest (pretty old and stable) RC1 release of it in an official release of it.

0

You could create two flags called 'download' and 'replay' with the Flag module and flag the music node when people download or replay that music. After that, you can create a view that shows how many times the nodes have been flagged with the aggregation function. I can't help you with the last part of your question, because I'm looking for a way to graph data too: How to create a line graph of the total user points on a profile page?.

  • Thanks. I've got the "flagging" logic implemented, though not through the Flag module. The Views module also has its flaws when aggregating on multiple relationships which causes a cartesian join-like product, but I've implemented this through a custom module which rewrites aggregated joins to joins on subqueries. However, I'm thinking that I need to solve the last part with a custom module by running the view with different arguments, collecting the data and generating the graphs I need. – sbrattla Dec 8 '13 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.