1. Create a sheet.
qChildListDef is added to the definition of the sheet in order to be able get the list of its children.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "CreateObject",
"handle": 1,
"params": [
{
"title": "Sheet 1",
"description": "Description of sheet 1",
"qInfo": {
"qId": "SH01",
"qType": "sheet"
},
"qChildListDef": {
"qData": {
"title": "/title",
"description": "/description",
"meta": "/meta",
"order": "/order",
"id": "/qInfo/qId",
"type": "/qInfo/qType",
"lb": "/qListObjectDef",
"hc": "/qHyperCubeDef"
}
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 2
},
"qInfo": {
"qId": "SH01",
"qType": "sheet"
}
},
"change": [
2
]
}
The sheet is created and the handle is 2.
2. Get the layout of the sheet. The handle is 2.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "GetLayout",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qLayout": {
"qInfo": {
"qId": "SH01",
"qType": "sheet"
},
"qMeta": {},
"qSelectionInfo": {},
"title": "Sheet 1",
"description": "Description of sheet 1",
"qChildList": {
"qItems": []
}
}
}
}
The GetLayout method evaluates the properties of the sheet. The sheet has no children.
3. Create a combo box in the sheet. The combo chart is composed of a list object (one dimension Country) and a hypercube (one dimension City and one measure Count(Holes)).
The client sends:
{
"jsonrpc": "2.0",
"id": 5,
"method": "CreateChild",
"handle": 2,
"params": [
{
"title": "Title of the combo chart",
"collapsed": {
"qVAExpression": "Count(Country) > 25"
},
"meta": {
"data": "this is the data"
},
"qInfo": {
"qId": "CB01",
"qType": "ComboChart"
},
"qListObjectDef": {
"qStateName": "$",
"qLibraryId": "",
"qDef": {
"qGrouping": "N",
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Dim1"
],
"qSortCriterias": [
{
"qSortByState": 0,
"qSortByFrequency": 0,
"qSortByNumeric": 0,
"qSortByAscii": 0,
"qSortByLoadOrder": 1,
"qSortByExpression": 0,
"qExpression": {
"qv": ""
}
}
]
},
"qInitialDataFetch": [
{
"qTop": 0,
"qLeft": 0,
"qHeight": 3,
"qWidth": 0
}
]
},
"qHyperCubeDef": {
"qStateName": "$",
"qDimensions": [
{
"qLibraryId": "",
"qNullSuppression": false,
"qIncludeElemValue": false,
"qDef": {
"qGrouping": "N",
"qFieldDefs": [
"City"
],
"qFieldLabels": [
"City label"
],
"qSortCriterias": [
{
"qSortByState": 0,
"qSortByFrequency": 0,
"qSortByNumeric": 0,
"qSortByAscii": 0,
"qSortByLoadOrder": 1,
"qSortByExpression": 0,
"qExpression": {
"qv": ""
}
}
]
}
}
],
"qMeasures": [
{
"qLibraryId": "",
"qDef": {
"qLabel": "Total",
"qDescription": "Chart HC Properties measure description",
"qGrouping": "N",
"qDef": "Count(Holes)"
}
}
],
"qInitialDataFetch": [
{
"qTop": 0,
"qLeft": 0,
"qHeight": 3,
"qWidth": 2
}
]
},
"description": "Description of the combo chart: list box and chart"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 3
},
"qInfo": {
"qId": "CB01",
"qType": "ComboChart"
}
},
"change": [
2,
3
]
}
The combo box contains a list object and a chart and is contained in the sheet SH01. The list object has one dimension, Country, and the chart contains one dimension, City, and one measure, Count(Holes). The combo chart has several full dynamic properties: title, collapsed and meta. The handle of the combo chart is 3.
4. Get the layout of the sheet. The handle is 2.
The client sends:
{
"jsonrpc": "2.0",
"id": 6,
"method": "GetLayout",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"qLayout": {
"qInfo": {
"qId": "SH01",
"qType": "sheet"
},
"qSelectionInfo": {},
"title": "Sheet 1",
"description": "Description of sheet 1",
"qChildList": {
"qItems": [
{
"qInfo": {
"qId": "CB01",
"qType": "ComboChart"
},
"qData": {
"title": "Title of the combo chart",
"description": "Description of the combo chart: list box and chart",
"meta": {
"data": "this is the data"
},
"order": "",
"id": "",
"type": "",
"lb": {
"qStateName": "$",
"qDef": {
"qGrouping": "N",
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Dim1"
],
"qSortCriterias": [
{
"qSortByLoadOrder": 1,
"qExpression": {}
}
],
"qNumberPresentations": [],
"qActiveField": 0
},
"qFrequencyMode": "N",
"qInitialDataFetch": [
{
"qLeft": 0,
"qTop": 0,
"qWidth": 0,
"qHeight": 3
}
],
"qExpressions": []
},
"hc": {
"qStateName": "$",
"qDimensions": [
{
"qDef": {
"qGrouping": "N",
"qFieldDefs": [
"City"
],
"qFieldLabels": [
"City label"
],
"qSortCriterias": [
{
"qSortByLoadOrder": 1,
"qExpression": {}
}
],
"qNumberPresentations": [],
"qActiveField": 0
},
"qOtherTotalSpec": {
"qOtherMode": "OTHER_OFF",
"qOtherCounted": {},
"qOtherLimit": {},
"qOtherLimitMode": "OTHER_GT_LIMIT",
"qForceBadValueKeeping": true,
"qApplyEvenWhenPossiblyWrongResult": true,
"qOtherSortMode": "OTHER_SORT_DESCENDING",
"qTotalMode": "TOTAL_OFF",
"qReferencedExpression": {}
}
}
],
"qMeasures": [
{
"qDef": {
"qLabel": "Total",
"qDescription": "Chart HC Properties measure description",
"qTags": [],
"qGrouping": "N",
"qDef": "Count(Holes)",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 0
},
"qAccumulate": 0,
"qActiveExpression": 0,
"qExpressions": []
},
"qSortBy": {
"qExpression": {}
},
"qAttributeExpressions": []
}
],
"qInterColumnSortOrder": [],
"qInitialDataFetch": [
{
"qLeft": 0,
"qTop": 0,
"qWidth": 2,
"qHeight": 3
}
],
"qMode": "S",
"qNoOfLeftDims": -1,
"qMaxStackedCells": 5000
}
}
}
]
}
}
}
}
The GetLayout method evaluates the properties of the sheet. The sheet contains one child: the combo chart CB01.
For more information on:
- qChildList, see ChildList
- qLayout, see GetLayout Method
5. Get the layout of the combo chart. The handle is 3.
The client sends:
{
"jsonrpc": "2.0",
"id": 8,
"method": "GetLayout",
"handle": 3,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 8,
"result": {
"qLayout": {
"qInfo": {
"qId": "CB01",
"qType": "ComboChart"
},
"qMeta": {},
"qSelectionInfo": {},
"title": "Title of the combo chart",
"collapsed": {
"qVAExpression": "Count(Country) > 25"
},
"meta": {
"data": "this is the data"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Lander"
]
},
"qListObject": {
"qStateName": "$",
"qSize": {
"qcx": 1,
"qcy": 22
},
"qDimensionInfo": {
"qFallbackTitle": "Dim1",
"qApprMaxGlyphCount": 14,
"qCardinal": 22,
"qSortIndicator": "A",
"qGroupFallbackTitles": [
"Dim1"
],
"qGroupPos": 0,
"qStateCounts": {
"qLocked": 0,
"qSelected": 0,
"qOption": 22,
"qDeselected": 0,
"qAlternative": 0,
"qExcluded": 0
},
"qTags": [
"$ascii",
"$text"
],
"qDimensionType": "D",
"qGrouping": "N"
},
"qExpressions": [],
"qDataPages": [
{
"qMatrix": [
[
{
"qText": "United States",
"qNum": "NaN",
"qElemNumber": 0,
"qState": "O"
}
],
[
{
"qText": "Denmark",
"qNum": "NaN",
"qElemNumber": 1,
"qState": "O"
}
],
[
{
"qText": "Spain",
"qNum": "NaN",
"qElemNumber": 2,
"qState": "O"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 3
}
}
]
},
"qHyperCube": {
"qStateName": "$",
"qSize": {
"qcx": 2,
"qcy": 7533
},
"qDimensionInfo": [
{
"qFallbackTitle": "City label",
"qApprMaxGlyphCount": 30,
"qCardinal": 7532,
"qSortIndicator": "A",
"qGroupFallbackTitles": [
"City label"
],
"qGroupPos": 0,
"qStateCounts": {
"qLocked": 0,
"qSelected": 0,
"qOption": 7532,
"qDeselected": 0,
"qAlternative": 0,
"qExcluded": 0
},
"qTags": [
"$text"
],
"qDimensionType": "D",
"qGrouping": "N"
}
],
"qMeasureInfo": [
{
"qFallbackTitle": "Total",
"qApprMaxGlyphCount": 5,
"qCardinal": 44,
"qSortIndicator": "N",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 0
},
"qMin": 0,
"qMax": 74
}
],
"qEffectiveInterColumnSortOrder": [
0,
1
],
"qGrandTotalRow": [
{
"qText": "17891",
"qNum": 17891,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
},
{
"qText": "17891",
"qNum": 17891,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
}
],
"qDataPages": [
{
"qMatrix": [
[
{
"qText": "Addison",
"qNum": "NaN",
"qElemNumber": 0,
"qState": "O"
},
{
"qText": "3",
"qNum": 3,
"qElemNumber": 0,
"qState": "L"
}
],
[
{
"qText": "Ivyland",
"qNum": "NaN",
"qElemNumber": 1,
"qState": "O"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
],
[
{
"qText": "Hemet",
"qNum": "NaN",
"qElemNumber": 2,
"qState": "O"
},
{
"qText": "6",
"qNum": 6,
"qElemNumber": 0,
"qState": "L"
}
]
],
"qTails": [
{
"qUp": 0,
"qDown": 0
}
],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 2,
"qHeight": 3
}
}
],
"qPivotDataPages": [],
"qStackedDataPages": [],
"qMode": "S"
},
"description": "Description of the combo chart: list box and chart"
}
}
}
The full dynamic properties are returned. An initial set of data is displayed for both the list object and the chart according to what has been defined by qInitialDataFetch in step 4 (when creating the combo chart).
For more information on: