mjordan / islandora_repository_reports

A Drupal 8 module that provides a collection of graphical reports on various aspects of an Islandora repository.
GNU General Public License v2.0
2 stars 5 forks source link

Create a generic/reusable data source plugin that executes a View #4

Open mjordan opened 4 years ago

mjordan commented 4 years ago

Basically, the View would be called within the getData() method of the plugin. Whatever is in the view then gets passed on to Chart.js.

mjordan commented 4 years ago

https://www.drupal.org/project/views_chartjs might work instead.

mjordan commented 4 years ago

Another way to integrate Views into Repository Reports is to have it provided some Islandora-specific Views field plugins, as described in https://github.com/mjordan/islandora_repository_reports/issues/6#issuecomment-629655293. The example in that comment is from Islandora Riprap, which provides a "Fixity Auditing" View field plugin that queries Riprap for fixity events on each media that show up in Islandora's "Manage Media" view. When the "field" the plugin defines is added to that View, it renders the data like this:

image

mjordan commented 4 years ago

To build on the implementation described at the very top of this issue, if this module provided a Views style plugin (a la https://www.drupal.org/docs/creating-custom-modules/building-a-views-display-style-plugin-for-drupal) that rendered the output of a View in a structure similar to the one returned by data source plugins' getData() method, any view that counted things using aggregation could be rendered as a chart.