Общая структура объекта layout

disableNavMenu: false
extensionMeta: {translationKey: "", icon: "table", iconChar: "puzzle", isLibraryItem: true, visible: true, …}
footnote: ""
qHyperCube: {qSize: {…}, qDimensionInfo: Array(1), qMeasureInfo: Array(1), qEffectiveInterColumnSortOrder: Array(2), qGrandTotalRow: Array(1), …}
qInfo: {qId: "BgJXgdA", qType: "TableExtensionTest"}
qMeta: {privileges: Array(4)}
qSelectionInfo: {}
showDetails: false
showTitles: true
subtitle: ""
title: ""
version: "1.0.0"
visualization: "TableExtensionTest"

layout -> extensionMeta

extensionMeta:
    author: ""
    dependencies: {qlik-sense: ">=3.0.x"}
    description: "Table visualization template"
    homepage: ""
    icon: "table"
    iconChar: "puzzle"
    iconPath: "M14.5,... 14.5,9 Z"
    isLibraryItem: true
    isThirdParty: true
    keywords: "qlik-sense, visualization"
    license: ""
    name: "TableExtensionTest"
    repository: ""
    template: "TableExtensionTest"
    translationKey: ""
    type: "visualization"
    version: "1.0.0"
    visible: true
footnote: ""

layout -> qHyperCube

qHyperCube:
    qColumnOrder: Array(0)
    qDataPages: [{…}]
    qDimensionInfo: [{…}]
    qEffectiveInterColumnSortOrder: (2) [0, 1]
    qGrandTotalRow: [{…}]
    qMeasureInfo: [{…}]
    qMode: "S"
    qNoOfLeftDims: -1
    qPivotDataPages: []
    qSize: {qcx: 2, qcy: 11}
    qStackedDataPages: []
    qTreeNodesOnDim: []

layout -> qHyperCube -> qDataPages

qHyperCube:
    qDataPages: Array(1)
        0:
            qArea:
            qHeight: 11
            qLeft: 0
            qTop: 0
            qWidth: 2
    qMatrix: Array(11)
        0: Array(2)
            0: {qText: "Closed", qNum: "NaN", qElemNumber: 0, qState: "O"}
            1: {qText: "8614", qNum: 8614, qElemNumber: 0, qState: "L"}
        1: (2) [{…}, {…}]
        2: (2) [{…}, {…}]
        3: (2) [{…}, {…}]
        4: (2) [{…}, {…}]
        5: (2) [{…}, {…}]
        6: (2) [{…}, {…}]
        7: (2) [{…}, {…}]
        8: (2) [{…}, {…}]
        9: (2) [{…}, {…}]
        10: (2) [{…}, {…}]
        length: 11
    qTails: Array(1)
        0:
            qDown: 0
            qUp: 0

layout -> qHyperCube -> qDimensionInfo

qDimensionInfo: Array(1)
    0:
        autoSort: true
        cId: "mrqmqF"
        othersLabel: "Others"
        qApprMaxGlyphCount: 35
        qAttrDimInfo: []
        qAttrExprInfo: []
        qCardinal: 11
        qCardinalities: {qCardinal: 11, qHypercubeCardinal: 11, qAllValuesCardinal: -1}
        qDimensionType: "D"
        qFallbackTitle: "Status"
        qGroupFallbackTitles: Array(1)
            0: "Status"
            length: 1
        qGroupFieldDefs: ["Status"]
        qGroupPos: 0
        qGrouping: "N"
        qIsAutoFormat: true
        qMax: "NaN"
        qMin: "NaN"
        qNumFormat: {qType: "U", qnDec: 0, qUseThou: 0}
        qSortIndicator: "A"
        qStateCounts: {qLocked: 0, qSelected: 0, qOption: 11, qDeselected: 0, qAlternative: 0, …}
        qTags: (2) ["$ascii", "$text"]
    length: 1

layout -> qHyperCube -> qMeasureInfo

qMeasureInfo: Array(1)
    0:
        autoSort: true
        cId: "dWPU"
        numFormatFromTemplate: true
        qApprMaxGlyphCount: 4
        qAttrDimInfo: []
        qAttrExprInfo: []
        qCardinal: 0
        qFallbackTitle: "Count([Case Count])"
        qIsAutoFormat: true
        qMax: 8614
        qMin: 6
        qNumFormat:
            qDec: "."
            qFmt: "###0"
            qType: "I"
            qUseThou: 1
            qnDec: 0
        qSortIndicator: "D"
        qTrendLines: []
        length: 1

layout -> qInfo

qInfo:
    qId: "BgJXgdA"
    qType: "TableExtensionTest"

layout -> qMeta

qMeta:
    privileges: Array(4)
        0: "read"
        1: "update"
        2: "delete"
        3: "exportdata"

Использование layout в javascript при разработке расширения

Посчитать количество строк в таблице через layout.hypercube

hypercube = layout.qHyperCube,
rowcount = hypercube.qDataPages[0].qMatrix.length,
colcount = hypercube.qDimensionInfo.length + hypercube.qMeasureInfo.length;
0 0 голосов
Рейтинг статьи

Подписаться
Уведомление о
guest
0 комментариев
Встроенная Обратная Связь
Просмотр всех комментариев
0
Оставьте, пожалуйста, комментарий!x
()
x