Skip to content

Matrix

With matrix you can visualize data by dynamic rows and columns.

Configuration

To open matrix from menus, use the menu action matrix open.

Matrix can be displayed as standalone or inside a Details View. Additionally a table can be configured to be available alongside the matrix. Filters which are applied on the table are then also available on the matrix component.

Example

"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2",
  "value": { "attributes": ["ATTRIBUTE3"], "types": ["single"] },
  "info": ["ATTRIBUTE4", "ATTRIBUTE5", "ATTRIBUTE6"],
  "settings": {
      "resultRow": ["sum"],
      "resultCol": ["sum"],
      "edit": false
  }
}

Options

row

The attribute name or a list of attribute names which are used to define the rows (y-axis). Each unique value of this attribute will be displayed as a own row. If multiple are supplied the user can choose the attribute at runtime. The first configured attribute is the default.

Example

One value:

"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2"
}
Multiple values:
"matrix": {
  "row": ["ATTRIBUTE1", "ATTRIBUTE3"],
  "column": "ATTRIBUTE2"
}

column

The attribute name or a list of attribute names which are used to define the columns (x-axis). Each unique value of this attribute will be displayed as a own column. If multiple are supplied the user can choose the attribute at runtime. The first configured attribute is the default.

Example

One value:

"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2"
}
Multiple values:
"matrix": {
  "row": "ATTRIBUTE1",
  "column": ["ATTRIBUTE2", "ATTRIBUTE3"]
}

value (optional)

The value defines how the cell value is calculated. It is optional. If no value is set the records for the row and column are counted.

The value consits of the following properties: - attributes: The attributes which can be used as cell value. If multiple are supplied the user can choose the attribute at runtime. The first configured attribute is the default. - types: The matrix value types which can be one or more of the following. If multiple are supplied the user can choose the type at runtime. The first aggregation type is the default. - sum: Sums all values for each cell. - single: Expects only a single value for each cell. If multiple values exist the first one is shown and the cell gets the css class cell-error - count: Shows the amount of values for each cell. - min: Shows the minimum value for each cell. - max: Shows the maximum value for each cell. - avg: Shows the average value for each cell.

Example

Count values:

"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2"
}
Sum values:
"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2",
  "value": { "attributes": ["ATTRIBUTE3"], "types": ["sum"] }
}
Single values:
"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2",
  "value": { "attributes": ["ATTRIBUTE3"], "types": ["single"] }
}

info

Allows the configuration of additional attributes which are shown when the user clicks on a cell with a single value.

Example

"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2",
  "info": ["ATTRIBUTE4", "ATTRIBUTE5", "ATTRIBUTE6"]
}

settings

Defines additional features which can be activated on the matrix.

  • resultRow: Shows a result row at the bottom of the matrix and aggregates the values of the column.
  • resultColumn: Shows a result column on the right side of the matrix and aggregates the values of the row.
  • edit: Allows editing the matrix cells. This only works if a matrix cell has exactly one record and only matrix type single. The default is false.
  • hideCsvDownload: Hides the Csv Download button: Default false.
  • csv: Defines how the attributes are exported by the csv export. Default: undefined.

resultRow/resultColumn

Aggregate functions are supplied as an array. If multiple aggregate functions are supplied the user can switch between them. The first one is selected as default.

Available aggregate functions: - sum: Shows the sum of the cells visible value. If the value can't be converted to a number it is ignored. - count: Shows the count of matrix cells which have at least one value. - min: Shows the minimum of the cells visible value. If the value can't be converted to a number it is ignored. - max: Shows the maximum of the cells visible value. If the value can't be converted to a number it is ignored. - avg: Shows the average of the cells visible value. If the value can't be converted to a number it is ignored.

"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2",
  "settings": {
      "resultRow": ["sum"],
      "resultCol": ["sum"],
      "edit": true
  }
}

CSV

The csv download button is displayed as default. To hide it permanently set hideCsvDownload to true.

The csv settings can be configured as shown here.

"matrix": {
  "row": "ATTRIBUTE1",
  "column": "ATTRIBUTE2",
  "settings": {
    "hideCsvDownload": false,
    "csv": {
      "...": "..."
    }
  }
}

Color

This setting allows the cells to be colored by a gradient depending on their value. The start color is shown on the minimal value and the end color on the maximal value. All values between are colored as a gradient between the start and end. Start and end value have to be an hexadecimal color value (e.g. #FFFFFF)

Example

"settings": {
  "color": {
    "start": "#FFD6D6",
    "end": "#CCFFCC"
  }
}