Add Field Widget Actions (FWA) support for Chart field using the chart_config_default widget
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3566576. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
Related to !1091
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Short Description: </strong>Add Field Widget Actions (FWA) support for Chart field using the chart_config_default widget.<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Chart fields are often configured based on structured or semi-structured data that may be generated, transformed, or summarized using AI. Currently, the Chart field rendered with the <code>chart_config_default</code> widget does not provide an in-widget mechanism to trigger AI Automators.<br>
This issue proposes adding Field Widget Actions (FWA) support for the Chart field + <code>chart_config_default</code> widget combination, using <code>modules/ai_automators/src/Plugin/FieldWidgetAction/Email.php</code> as reference implementation. The implementation requires the Charts module to be enabled, as it provides both the field type and the widget.<br>
A practical way to test this is to configure an AI Automator that analyzes a text description or dataset and stores the resulting chart configuration into the Chart field via the FWA.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ul>
<li>Add a new FWA plugin for the Chart field when using the <code>chart_config_default</code> widget, modeled after <code>modules/ai_automators/src/Plugin/FieldWidgetAction/Email.php</code>.</li>
<li>Declare a dependency on the Charts module and ensure the FWA is only available when the Chart field type and widget are in use.</li>
</ul>
<p>- <strong>This issue was created with the help of AI</strong></p>
issue