Problem/Motivation

Currently, the data collector table in the Charts module does not allow users to easily reorder data once it has been entered. If a user needs to move a row/column, they must manually re-enter the data or re-import the CSV file.

Steps to reproduce

  1. Create or edit a chart
  2. Enter multiple rows/columns of data
  3. There are no controls to move rows nor columns

Proposed resolution

Implement comprehensive row and column reordering support for the ChartDataCollectorTable form element.

Remaining tasks

  • What is the long-term plan for drag-and-drop support in the data collector table? There are existing tabledrag hooks in the code, but they don't seem to be used.

User interface changes

  • New operation buttons (arrows) in the row and column operations cells.

API changes

No breaking changes to public APIs. Internal helper methods swapRows and swapColumns were added to facilitate reordering logic.

Data model changes

Issue fork charts-3585865

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cballenar created an issue. See original summary.

andileco’s picture

Hi @cballenar - thank you for this ticket! Should the ticket status be "Needs review", or are you still working on it?

cballenar’s picture

Status: Active » Needs review

@andileco thanks for checking! This is ready for review/feedback.