Select a range of values in a hypercube
Make range selections in measures by using the RangeSelectHyperCubeValues method.
Example
1. Get the layout of the chart.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "GetLayout",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qLayout": {
"qInfo": {
"qId": "CH01",
"qType": "Chart"
},
"qMeta": {},
"qSelectionInfo": {},
"qHyperCube": {
"qStateName": "$",
"qSize": {
"qcx": 3,
"qcy": 10
},
"qDimensionInfo": [
{
"qFallbackTitle": "ProductName label",
"qApprMaxGlyphCount": 31,
"qCardinal": 10,
"qSortIndicator": "N",
"qGroupFallbackTitles": [
"ProductName label"
],
"qGroupPos": 0,
"qStateCounts": {
"qLocked": 0,
"qSelected": 0,
"qOption": 10,
"qDeselected": 0,
"qAlternative": 0,
"qExcluded": 0
},
"qTags": [
"$text"
],
"qDimensionType": "D",
"qGrouping": "N"
}
],
"qMeasureInfo": [
{
"qFallbackTitle": "Sum (OrderTotal) label",
"qApprMaxGlyphCount": 10,
"qCardinal": 11,
"qSortIndicator": "A",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 0
},
"qMin": 164.1675,
"qMax": 5841
},
{
"qFallbackTitle": "Count (Country) label",
"qApprMaxGlyphCount": 1,
"qCardinal": 1,
"qSortIndicator": "A",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 0
},
"qMin": 1,
"qMax": 1
}
],
"qEffectiveInterColumnSortOrder": [
0,
1,
2
],
"qGrandTotalRow": [
{
"qText": "19127,4425",
"qNum": 19127.442500000008,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
},
{
"qText": "19127,4425",
"qNum": 19127.442500000008,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
}
],
"qDataPages": [
{
"qMatrix": [
[
{
"qText": "\"Grandma's Boysenberry Spread\"",
"qNum": "NaN",
"qElemNumber": 0,
"qState": "O"
},
{
"qText": "1110,96",
"qNum": 1110.96,
"qElemNumber": 0,
"qState": "L"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
],
[
{
"qText": "Rössle Sauerkraut",
"qNum": "NaN",
"qElemNumber": 1,
"qState": "O"
},
{
"qText": "1606,3",
"qNum": 1606.3000000000002,
"qElemNumber": 0,
"qState": "L"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
],
[
{
"qText": "Chartreuse verte",
"qNum": "NaN",
"qElemNumber": 2,
"qState": "O"
},
{
"qText": "424,8",
"qNum": 424.79999999999995,
"qElemNumber": 0,
"qState": "L"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
],
[
{
"qText": "Spegesild",
"qNum": "NaN",
"qElemNumber": 3,
"qState": "O"
},
{
"qText": "164,1675",
"qNum": 164.1675,
"qElemNumber": 0,
"qState": "L"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
],
[
{
"qText": "Escargots de Bourgogne",
"qNum": "NaN",
"qElemNumber": 4,
"qState": "O"
},
{
"qText": "5841",
"qNum": 5841,
"qElemNumber": 0,
"qState": "L"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
]
],
"qTails": [
{
"qUp": 0,
"qDown": 0
}
],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 3,
"qHeight": 5
}
},
{
"qMatrix": [],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 0,
"qHeight": 0
}
},
{
"qMatrix": [],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 0,
"qHeight": 0
}
}
],
"qPivotDataPages": [],
"qStackedDataPages": [],
"qMode": "S"
}
}
}
}
2. Select the values in the range [160,425] related to the measure of number 0.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "RangeSelectHyperCubeValues",
"handle": 2,
"params": [
"/qHyperCubeDef",
[
{
"qRange": {
"qMin": 160,
"qMax": 425
},
"qMeasureIx": 0
}
]
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"qSuccess": true
},
"change": [
2
]
}
The selection is successful ("qSuccess": true).
3. Get the layout of the chart.
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": "CH01",
"qType": "Chart"
},
"qMeta": {},
"qSelectionInfo": {},
"qHyperCube": {
"qStateName": "$",
"qSize": {
"qcx": 3,
"qcy": 2
},
"qDimensionInfo": [
{
"qFallbackTitle": "ProductName label",
"qApprMaxGlyphCount": 31,
"qCardinal": 10,
"qSortIndicator": "N",
"qGroupFallbackTitles": [
"ProductName label"
],
"qGroupPos": 0,
"qStateCounts": {
"qLocked": 0,
"qSelected": 2,
"qOption": 0,
"qDeselected": 0,
"qAlternative": 8,
"qExcluded": 0
},
"qTags": [
"$text"
],
"qDimensionType": "D",
"qGrouping": "N"
}
],
"qMeasureInfo": [
{
"qFallbackTitle": "Sum (OrderTotal) label",
"qApprMaxGlyphCount": 8,
"qCardinal": 3,
"qSortIndicator": "A",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 0
},
"qMin": 164.1675,
"qMax": 424.79999999999995
},
{
"qFallbackTitle": "Count (Country) label",
"qApprMaxGlyphCount": 1,
"qCardinal": 1,
"qSortIndicator": "A",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 0
},
"qMin": 1,
"qMax": 1
}
],
"qEffectiveInterColumnSortOrder": [
0,
1,
2
],
"qGrandTotalRow": [
{
"qText": "588,9675",
"qNum": 588.96749999999986,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
},
{
"qText": "588,9675",
"qNum": 588.96749999999986,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": -1,
"qState": "X",
"qIsTotalCell": true
}
],
"qDataPages": [
{
"qMatrix": [
[
{
"qText": "Chartreuse verte",
"qNum": "NaN",
"qElemNumber": 2,
"qState": "S"
},
{
"qText": "424,8",
"qNum": 424.79999999999995,
"qElemNumber": 0,
"qState": "L"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
],
[
{
"qText": "Spegesild",
"qNum": "NaN",
"qElemNumber": 3,
"qState": "S"
},
{
"qText": "164,1675",
"qNum": 164.1675,
"qElemNumber": 0,
"qState": "L"
},
{
"qText": "1",
"qNum": 1,
"qElemNumber": 0,
"qState": "L"
}
]
],
"qTails": [
{
"qUp": 0,
"qDown": 0
}
],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 3,
"qHeight": 2
}
},
{
"qMatrix": [],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 0,
"qHeight": 0
}
},
{
"qMatrix": [],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 0,
"qHeight": 0
}
}
],
"qPivotDataPages": [],
"qStackedDataPages": [],
"qMode": "S"
}
}
}
}
There are two values selected in the range [160,425]:
- Chartreuse verte with a total order of 424.8
- Spegesild with a total order of 164.1675