Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module integrates the Plotly.js library with Drupal's Charts module, enabling you to create a wide variety of interactive charts using Plotly's capabilities. It allows you to display data visualizations within views, entity fields, WYSIWYG editors, and Twig templates.

This is a module that integrates the Plotly.js library with the Charts module.

"Plotly.js is an open-source JavaScript charting library for creating interactive visualizations on the web. Built on top of D3.js and WebGL, it provides a high-level declarative API for creating publication-quality graphs." (Plotly.js website).

The project is open-source (MIT license) and free to use in commercial
applications.

Available chart types and features include:

Requirements

This module requires the following modules:

  • Charts (version 5.2.1 or higher)

Recommended modules

If you don't want to use data already in your site, here are a few
recommended modules:

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

This module uses Asset Packagist to bring in the Plotly.js library. Before you require the module with Composer, you need to make sure the following exist in your composer.json file:

  1. The Asset Packagist repository is added to the "repositories" section.

    "repositories": [
      {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
      },
      {
        "type": "composer",
        "url": "https://asset-packagist.org"
      }
    ],
    
  2. The "oomphinc/composer-installers-extender" package is installed.
    This package allows you to install libraries into the "/libraries" directory
    instead of the default "/vendor" directory.

    composer require --prefer-dist oomphinc/composer-installers-extender
    
  3. The installer types and paths are set in the "extra" section of your
    composer.json file. This tells Composer to install Plotly.js into the
    "/libraries/plotly.js" directory.

    "extra": {
      "installer-types": ["npm-asset", "bower-asset"],
      "installer-paths": {
        "web/libraries/plotly.js": ["npm-asset/plotly.js-dist-min"],
        "web/libraries/{$name}": [
          "type:drupal-library",
          "type:bower-asset",
          "type:npm-asset"
        ]
      }
    }
    
  4. Install the module using Composer:

    composer require drupal/charts_plotly
    

Configuration

  1. Enable the module at Administration > Extend.
  2. Set Plotly as your default charting library
    at /admin/config/content/charts.
  3. Create your chart! There are several ways to create a chart:
    • Create a view and use the "Chart" format
    • Add a chart field to your entity type (e.g. node, user, etc.)
    • Add a chart in your WYSIWYG using Charts Text Filter
    • Add a chart in your Twig template using Charts Twig
    • Use the Charts API to create a chart programmatically

Activity

Total releases
5
First release
Oct 2025
Latest release
3 weeks ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.4 Stable Jun 22, 2026
1.0.2 Stable Nov 19, 2025
1.0.1 Stable Nov 19, 2025
1.0.0 Stable Nov 4, 2025
1.0.x-dev Dev Oct 28, 2025