Drupal is a registered trademark of Dries Buytaert

dkan_chart

No security coverage
View on drupal.org
DKAN Charts

Chart/Table visualization for DKANv2 Datastore API

Installation

DKAN

Take care to enable the datastore submodule of DKAN.

the datastore module needs to be enabled beforehand, it will not get automatically enabled due to https://github.com/GetDKAN/dkan/discussions/4149

clipboard.js

The clipboardjs module is used. You need to take care of installing the clipboard.js library. See README

Configuration

Number format settings

You can provide a decimal separator and a thousands separator by config setting.

$config['dkan_chart.number_settings'] = [ 'decimal_separator' => ',', 'thousands_separator' => '.', ]

The decimal separator will be switched to full stop. The thousands separator will be removed.

This may help outputting the visualizations.

Datastore rows limit

DKAN defines a datastore rows limit setting to control the maximum number of rows the datastore endpoints can return in a single request. This is set to 500 by default. DKAN chart operates based on this setting. You can increase this setting at admin/dkan/datastore if 500 does not suit your datasets.

If possible increase to the maximum number of rows your datasets provide. But setting too high can lead to to timeouts or memory issues.

Features

Provide chart visualization features for data from DKANv2 Datastore API, currently based on chartjs

There will be a tab "Visualization" on each dataset node that has distribution/s in the datastore. On this tab different visualizations can be arranged for this distribution.

If you do not see the tab (like when using DKAN react frontend) you can directly access the visualization page via node/ID/visualize. You may also need to set permissions: admin/people/permissions/module/dkan_chart

Using Choices-js for some multivalue select fields in the UI of the visualizations (for the time being, may change to Select2 or Selectize later if necessary. Choices-js does not need jQuery, which makes it kind of sympathetic as Drupal is also slightly moving away from jQuery).

Feature Spreadsheet tables

By enabling the submodule dkan_tables a spreadsheet like output of the data with Datatables (Default) or Revolist (optional, now deprecated, will not receive new features currently) is possible

(changed via setting table_plugin in dkan_tables.settings.yml)

If you do not see the tab (like when using DKAN react frontend) you can directly access the visualization page via node/ID/tables. You may also need to set permissions: admin/people/permissions/module/dkan_tables

Remarks

JS Libraries plugin-autocolors and choices are patched:

plugin-autocolors:

https://github.com/stefan-korn/chartjs-plugin-autocolors/tree/data-mode-index-and-push-order

choices:

https://github.com/Choices-js/Choices/pull/1152

Activity

Total releases
2
First release
Aug 2025
Latest release
5 months ago
Release cadence
58 days
Stability
0% stable

Releases

Version Type Release date
1.0.0-beta2 Pre-release Oct 1, 2025
1.0.0-beta1 Pre-release Aug 4, 2025