qlik-oss/sn-table

View on GitHub
api-specifications/properties.json

Summary

Maintainability
Test Coverage
{
  "scriptappy": "1.1.0",
  "info": {
    "name": "@nebula.js/sn-table:properties",
    "description": "Table generic object definition",
    "version": "2.9.1",
    "license": "MIT",
    "stability": "stable",
    "x-qlik-visibility": "public"
  },
  "entries": {
    "properties": {
      "extends": [
        {
          "type": "GenericObjectProperties"
        }
      ],
      "kind": "object",
      "entries": {
        "version": {
          "description": "Current version of this generic object definition",
          "type": "string"
        },
        "qHyperCubeDef": {
          "description": "Extends HyperCubeDef, see Engine API: HyperCubeDef",
          "extends": [
            {
              "type": "HyperCubeDef"
            }
          ],
          "kind": "object",
          "entries": {
            "qDimensions": {
              "description": "The maximum amount of dimensions is 1000",
              "kind": "array",
              "items": {
                "type": "#/definitions/DimensionProperties"
              }
            },
            "qMeasures": {
              "description": "The maximum amount of measures is 1000",
              "kind": "array",
              "items": {
                "type": "#/definitions/MeasureProperties"
              }
            },
            "qColumnOrder": {
              "kind": "array",
              "items": {
                "type": "number"
              }
            }
          }
        },
        "showTitles": {
          "description": "Show title for the visualization",
          "optional": true,
          "defaultValue": true,
          "type": "boolean"
        },
        "enableChartExploration": {
          "description": "Show chart exploration option in context menu",
          "optional": true,
          "defaultValue": false,
          "type": "boolean"
        },
        "title": {
          "description": "Visualization title",
          "optional": true,
          "defaultValue": "",
          "kind": "union",
          "items": [
            {
              "type": "string"
            },
            {
              "type": "StringExpression"
            }
          ]
        },
        "subtitle": {
          "description": "Visualization subtitle",
          "optional": true,
          "defaultValue": "",
          "kind": "union",
          "items": [
            {
              "type": "string"
            },
            {
              "type": "StringExpression"
            }
          ]
        },
        "footnote": {
          "description": "Visualization footnote",
          "optional": true,
          "defaultValue": "",
          "kind": "union",
          "items": [
            {
              "type": "string"
            },
            {
              "type": "StringExpression"
            }
          ]
        },
        "totals": {
          "description": "totals settings",
          "optional": true,
          "entries": {
            "show": {
              "description": "If set to true, the display of the totals row will be handled automatically, and the `position` prop will be ignored.",
              "optional": true,
              "defaultValue": true,
              "type": "boolean"
            },
            "position": {
              "description": "The position of the totals row, hiding it if set to `noTotals`",
              "optional": true,
              "defaultValue": "noTotals",
              "kind": "union",
              "items": [
                {
                  "kind": "literal",
                  "value": "'top'"
                },
                {
                  "kind": "literal",
                  "value": "'bottom'"
                },
                {
                  "kind": "literal",
                  "value": "'noTotals'"
                }
              ]
            },
            "label": {
              "description": "The label of the totals row, shown in the leftmost column",
              "optional": true,
              "defaultValue": "Totals",
              "type": "string"
            }
          },
          "kind": "object"
        },
        "usePagination": {
          "description": "Use pagination or continuous scroll. If undefined, defaults to using pagination",
          "optional": true,
          "defaultValue": false,
          "type": "boolean"
        },
        "components": {
          "description": "Holds general styling",
          "nullable": true,
          "kind": "array",
          "items": {
            "type": "#/definitions/Component"
          }
        }
      }
    }
  },
  "definitions": {
    "DimensionProperties": {
      "description": "Extends `NxDimension`, see Engine API: `NxDimension`",
      "extends": [
        {
          "type": "NxDimension"
        }
      ],
      "kind": "object",
      "entries": {
        "qDef": {
          "type": "#/definitions/InlineDimensionDef"
        },
        "qAttributeExpressions": {
          "kind": "array",
          "items": {
            "type": "#/definitions/AttributeExpressionProperties"
          }
        }
      }
    },
    "MeasureProperties": {
      "description": "Extends `NxMeasure`, see Engine API: `NxMeasure`",
      "extends": [
        {
          "type": "NxMeasure"
        }
      ],
      "kind": "object",
      "entries": {
        "qDef": {
          "type": "#/definitions/InlineMeasureDef"
        },
        "qAttributeExpressions": {
          "kind": "array",
          "items": {
            "type": "#/definitions/AttributeExpressionProperties"
          }
        }
      }
    },
    "InlineDimensionDef": {
      "description": "Extends `NxInlineDimensionDef`, see Engine API: `NxInlineDimensionDef`.",
      "extends": [
        {
          "type": "NxInlineDimensionDef"
        }
      ],
      "kind": "object",
      "entries": {
        "textAlign": {
          "optional": true,
          "type": "#/definitions/TextAlign"
        },
        "columnWidth": {
          "optional": true,
          "type": "#/definitions/ColumnWidth"
        }
      }
    },
    "InlineMeasureDef": {
      "description": "Extends `NxInlineMeasureDef`, see Engine API: `NxInlineMeasureDef`.",
      "extends": [
        {
          "type": "NxInlineMeasureDef"
        }
      ],
      "kind": "object",
      "entries": {
        "textAlign": {
          "optional": true,
          "type": "#/definitions/TextAlign"
        },
        "columnWidth": {
          "optional": true,
          "type": "#/definitions/ColumnWidth"
        }
      }
    },
    "AttributeExpressionProperties": {
      "description": "Extends `NxAttrExprDef`, see Engine API: `NxAttrExprDef`.\nColumn specific styling overrides general styling, that is defined in `components`.",
      "extends": [
        {
          "type": "NxAttrExprDef"
        }
      ],
      "kind": "object",
      "entries": {
        "id": {
          "description": "specifying what the color applies to",
          "kind": "union",
          "items": [
            {
              "kind": "literal",
              "value": "'cellForegroundColor'"
            },
            {
              "kind": "literal",
              "value": "'cellBackgroundColor'"
            }
          ]
        }
      }
    },
    "TextAlign": {
      "description": "Holds text alignment for a specific column.",
      "extends": [
        {
          "type": "NxInlineDimensionDef"
        }
      ],
      "kind": "object",
      "entries": {
        "auto": {
          "description": "If true, sets the alignment based on the type of column (left for dimension, right for measure)",
          "type": "boolean"
        },
        "align": {
          "description": "Is used (and mandatory) if `auto` is false",
          "kind": "union",
          "items": [
            {
              "kind": "literal",
              "value": "'left'"
            },
            {
              "kind": "literal",
              "value": "'center'"
            },
            {
              "kind": "literal",
              "value": "'right'"
            }
          ]
        }
      }
    },
    "ColumnWidth": {
      "description": "Column width info",
      "kind": "object",
      "entries": {
        "type": {
          "description": "Defines how the column width is set. `auto` calculates the width(s) so the total table width equals the chart width. `fitToContent` calculates a width based on the cells' content. `pixels` uses a specified pixel value. `percentage` sets the column width to specified percentage of the chart width",
          "kind": "union",
          "items": [
            {
              "kind": "literal",
              "value": "'auto'"
            },
            {
              "kind": "literal",
              "value": "'FitToContent'"
            },
            {
              "kind": "literal",
              "value": "'pixels'"
            },
            {
              "kind": "literal",
              "value": "'percentage'"
            }
          ]
        },
        "pixels": {
          "description": "Is used (and mandatory) if type is `pixels`",
          "optional": true,
          "type": "number"
        },
        "percentage": {
          "description": "Is used (and mandatory) if type is `percentage`",
          "optional": true,
          "type": "number"
        }
      }
    },
    "Component": {
      "description": "General styling for all columns.\nSplit up into header and content (body) styling.\nIf any property is not set, default values specific for each property is used.",
      "kind": "object",
      "entries": {
        "key": {
          "description": "This should be set to `theme`",
          "type": "string"
        },
        "content": {
          "optional": true,
          "type": "#/definitions/ContentStyling"
        },
        "header": {
          "optional": true,
          "type": "#/definitions/HeaderStyling"
        }
      }
    },
    "ContentStyling": {
      "description": "Holds properties for font size, font color and hover styling.",
      "kind": "object",
      "entries": {
        "fontSize": {
          "description": "Defaults to `14`",
          "optional": true,
          "type": "number"
        },
        "fontColor": {
          "description": "Defaults to `#404040`",
          "optional": true,
          "type": "#/definitions/PaletteColor"
        },
        "hoverEffect": {
          "description": "Toggles hover effect",
          "optional": true,
          "type": "boolean"
        },
        "hoverColor": {
          "description": "Background hover color. Uses `#f4f4f4` if no hover colors are set, is transparent if only `hoverFontColor` is set",
          "optional": true,
          "type": "#/definitions/PaletteColor"
        },
        "hoverFontColor": {
          "description": "When only `hoverColor` is set, this is adjusted to either `#f4f4f4` or `#ffffff` for optimal contrast",
          "optional": true,
          "type": "#/definitions/PaletteColor"
        },
        "padding": {
          "description": "Css setting for the cell padding, defaults to `4px 12px`",
          "optional": true,
          "type": "string"
        }
      }
    },
    "HeaderStyling": {
      "description": "Holds properties for font size and color.",
      "kind": "object",
      "entries": {
        "fontSize": {
          "description": "Defaults to `14`",
          "optional": true,
          "type": "number"
        },
        "fontColor": {
          "description": "Defaults to `#404040`",
          "optional": true,
          "type": "#/definitions/PaletteColor"
        }
      }
    },
    "PaletteColor": {
      "description": "Color information structure. Holds the actual color and index in palette",
      "kind": "object",
      "entries": {
        "color": {
          "description": "Color as hex string (mandatory if index: -1)",
          "type": "string"
        },
        "index": {
          "description": "Index in palette",
          "type": "number"
        }
      }
    }
  }
}