Uploaded image for project: 'ChartJS Integration'
  1. ChartJS Integration
  2. CHARTJS-41

Reorganize the Edit Macro dialog of the chartjs and tableToChartJS macros

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 1.6.3
    • None
    • None
    • Unknown

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Lucas C Charpentier Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: