This issue has been created
 
 
ChartJS Integration / cid:jira-generated-image-avatar-35560758-c782-48aa-a123-5da9bcf1c776 CHARTJS-41 Open

Reorganize the Edit Macro dialog of the chartjs and tableToChartJS macros

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-cfc40bad-cae2-4040-8cc1-32350c84afc4 Charpentier Lucas created this issue on 22/Oct/26 12:10
 
Summary: Reorganize the Edit Macro dialog of the chartjs and tableToChartJS macros
Issue Type: cid:jira-generated-image-avatar-35560758-c782-48aa-a123-5da9bcf1c776 Improvement
Affects Versions: 1.6.3
Assignee: Unassigned
Created: 22/Oct/26 12:10
Priority: cid:jira-generated-image-static-major-c0bd7859-0ef5-4e71-ba2b-a81be7047202 Major
Reporter: Charpentier Lucas
Description:

The Edit Macro dialog of the chartjs and tableToChartJS macros makes the type mandatory, while a default type would work for every example, and shows rarely used and styling parameters with the main ones.

The macros to change, with the file where most of the fix is done:

  • chartjs: parameters declared in its wiki macro definition, WebHome.xml.
  • tableToChartJS: parameters declared in its wiki macro definition, TableToChartJS.xml.

The main problems:

  • The type parameter of both macros is mandatory, so Quick Actions opens the dialog and a macro without type renders an error instead of a chart.
  • tableToChartJS has 8 fields in its Optional parameters group, mixing the options of the data with the display options.
  • The width and height of tableToChartJS change nothing with the default options, and the cssClass, id and options parameters are not marked as advanced.

KOs covered

Macro Criterion Parameters Problem
chartjs C2 mandatory type Mandatory, while a default type, like bar, would work for any content of the documentation: {{chartjs}}{...}{{/chartjs}} would give a chart instead of the error "Parameter [type] is mandatory". Because of it, Quick Actions opens the Edit Macro dialog, see L1.
chartjs C8 advanced cssClass A rarely used styling hook, not marked advanced.
chartjs C8 advanced id A rarely used hook, not marked advanced.
tableToChartJS C2 mandatory type Mandatory, while a default type, like bar, would work for the table of the most common example and for any table of the documentation: {{tableToChartJS table="singleDataSet" /}} would give a chart instead of the error "Parameter [type] is mandatory". Because of it, Quick Actions opens the Edit Macro dialog, see L1.
tableToChartJS C5 groups multipleDataSets The 8 fields of the Optional parameters group are above 7, mixing the options of the data, multipleDataSets and dataSetLabel, with the display options, width, height, cssClass, title and id. The same holds for every parameter of the group.
tableToChartJS C5 groups dataSetLabel, options, height, cssClass, id The 8 fields of the Optional parameters group are above 7, see the note of multipleDataSets.
tableToChartJS C8 advanced dataSetLabel Set by one of the five examples, and only useful for a table with a label column among its data columns.
tableToChartJS C8 advanced options The description itself says "Advanced", and the field is not marked advanced, while only the last example of five sets it.
tableToChartJS C5 groups width The 8 fields of the Optional parameters group are above 7, see the note of multipleDataSets. The field is the last of the dialog, below the fold.
tableToChartJS C8 advanced width Not marked advanced, and with the default options it changes nothing: width="300" is written on the canvas, which Chart.js resizes to the width of its container, 803 pixels in the test. It only applies with options='{"responsive": false}'.
tableToChartJS C8 advanced height Not marked advanced, and with the default options it changes nothing: height="150" is overridden by the aspect ratio of Chart.js. It only applies with options='{"maintainAspectRatio": false}', where the height is then 150 pixels, or with responsive set to false in the options.
tableToChartJS C8 advanced cssClass A rarely used styling hook, not marked advanced.
tableToChartJS C5 groups title The 8 fields of the Optional parameters group are above 7, see the note of multipleDataSets. The field is below the fold.
tableToChartJS C8 advanced id A rarely used hook, not marked advanced.

Impact found on macro fluidity

These 18 KOs come from the WYSIWYG usability audit of the macros, under the criteria C2 mandatory, C5 groups, C8 advanced of its usability criteria. The page of each macro, linked in the table, has the full notes and the steps to reproduce. Fixing them means changing the parameter declarations of the macros: their groups, order, default values, mandatory and advanced flags.