Displaying charts using Views
In this recipe, we will use the Charts module to create graphs using the Views module. The Charts module integrates different graphing libraries with the Views module. The view created in this recipe will display a graph based on statistics generated from the Statistic modules to graph visits to content on the Drupal site.
Leverage the Charts module to create a view that renders a chart of data.
Getting ready
This recipe requires having enough data available to put into a graph. We will be using data available from the Statistics module, which tracks content page views. To generate content and view statistics, we will use the Devel (for Development) module. This module provides the means of generating sample content and populating statistics.
To use Devel
to generate content, we must add it with Composer and install it with Drush:
composer require drupal/devel php vendor/bin/drush en devel_generate statistics --yes
Now, we can generate...