Open mjordan opened 4 years ago
https://www.drupal.org/project/views_chartjs might work instead.
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:
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.
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.