Embedding Insight

Hardik Chheda Updated by Hardik Chheda

iFrame/Embedding Insights 

Tellius allows end-users to embed Insights. To embed our insights, users would require a JWT token and the endpoint.

Create insights and Post message

Sample URL:

http://localhost:3000/discover/create?businessviewid=bv_b0686e99-8d86-41b5-84b2-739fa9ad1c2a&jwt={jwtToken}.

The JWT token -  should be the one which is provided by the Tellius authentication API.

Businessviewid - needs to be passed to the URL to generate the insight from the specific Business View.

Post-message: State of Insight can be:

  1. Running
  2. Completed
  3. Failed

Users get notified via post-message when the state gets changed. Below is the snippet of the post-message. The response data will have

  1. Request info
  2. actionType: It  can be INSIGHT_INITIATED, INSIGHT_FAILED, INSIGHT_COMPLETED,
  3. Result info: Result will have the below attributes which can be used for the redirection to the insight ex: https://dev.app.tellius.com/discover/insight/insight_1e2a91cb-c7f0-48b3-9ab0-72014498a441/driver_c9d90505-08ae-4d67-bc5d-61ad2acb886f 
    a) insightId,
    b) driverId 

User will have all the required info like:

  1. Date/Time of creation: identified by the attribute called starttime
  2. Created By: identified by the attribute called  createdBy
  3. Name of insights: identified by the attribute called driverName
  4. Type of insights (Trend, Comparison, etc): identified by the attribute called jobType
    a) SegmentDiscoveryInsight
    b) Trend
    c) Cohort
    d) segment discovery
  5. Flag indicating if the insights have not been opened/seen: identified by the attribute called: You can refer the flag called `consumed` in the GET Insight API
{ 
"actionType": "INSIGHT_COMPLETED", "timetaken": "18s", "result": { "insightId": "insight_4c0133ab-ed88-4512-8874-b9dbf3dae544", "driverId": "driver_e83557ed-14ca-4aeb-9b71-1412953d43b3", "type": "DriverCreateResponse" }, "fromGraph": false, "request": { "driverName": "gc1", "label": "Ship_Mode", "options": { "featureselection_featurenames": "Row_ID,Order_ID", "featureselection_includefeaturenames": "true", "targetLabel": "First Class", "treeDepth": "large,small", "sample": "0.1", "createStage": "false" }, "sourceid": "bv_66513cf3-8a58-4be0-8d06-f8cf26d4725f", "createdBy": "18d60756-712e-4867-a301-430ba7f58880", "labelType": "categorical" }, "consumed": false, "jobType": "SegmentDiscoveryInsight", "status": "SUCCESS", "jobId": "ae661436-7863-4fb1-a63a-9fb8a90157ee", "starttime": "2021-03-11T17:36:05.068Z", "createdBy": "superUser", "estimatedResourceSizeBytes": 2663691, "name": "Segment Discovery Insight"
}

View insights 

Sample URL 

https://dev.app.tellius.com/discover/insight/insight_92f69873-be04-4490-9c17-5a07ef436e68/driver_fe44b5c5-4e47-4179-b666-7f35f51babd3?access=edit&jwt={jwt token}

The JWT token -  should be the one which is provided by the Tellius authentication API.

access - edit/read - Provides the input to decide whether the access is read or edit

Insights APIs

GET Insights:

https://dev.app.tellius.com/insight?includingShared=true&withSharings=true&limit=4&offset=0

DELETE Insight by id:  

curl -v -X DELETE -H "Content-Type: application/json" -H "Cache-Control: no-cache" \  -H 'Authorization: Bearer eyJ..T3A' \  http://52.87.228.68:8082/insight/myInsightId4

 

includingShared

Returns Viz object which are shared to this user as well

Limit

Number of elements to be returned

Offset

Offset value of the starting element to be returned

onlyShared

If true, will return only objects, shared to and not created by this user

 

Other RESTful API

GET notifications:

We can get the list of user notifications using the below API endpoint, users can also filter by read/unread and other fields described below.

https://dev.app.tellius.com/api/jobs/list?createdBy=superUser&limit=10&type=Insight&includeConsumed=true&offset=0&sortBy=createdAt

type

type of notification among, type can be  data, ML or Insight

createdBy

Filters the notification based on the createdBy

limit

limits the the notification count

includeConsumed

Filters the notification based read/unread

offset

offset for paginating notifications

Mark Notifications as read: 

To mark Insight notification as read, please use the below snippet

curl -X PUT \  https://dev2.app.tellius.com/insight/insight_9259fc73-c3ef-4a33-99d7-b35efca71eb7 \  -H 'authorization: Auth_token' \  -H 'cache-control: no-cache' \  -H 'content-type: application/json' \  -H 'postman-token: b97aaee9-ac75-369e-2d75-026e4a7ef624' \  -d '{ "consumed": false}'

 

Web socket Notifications

Successful Insight notification

If an insight is created successfully, the user would receive a response from the socket with the below Object.

The Object will have

  1. Request info
  2. Result info: Result will have the below attributes which can be used for the redirection to the insight ex: https://demo.app.tellius.com/discover/insight/insight_1e2a91cb-c7f0-48b3-9ab0-72014498a441/driver_c9d90505-08ae-4d67-bc5d-61ad2acb886f 
    a)insightId
    b)driverId 
{ "request": { //. request object passed to create insight "driverName": "TestIngihts", // owner of the insight
"label": "Buyer_Name", "options": { "featureselection_featurenames": "Row_ID,Order_ID", // selected features from columns "featureselection_includefeaturenames": "true", "targetLabel": "Aaron Bergman", // Insight concentrated around these values "treeDepth": "large,small", "sample": "0.1", "createStage": "false" }, "sourceid": "bv_66513cf3-8a58-4be0-8d06-f8cf26d4725f", "createdBy": "18d60756-712e-4867-a301-430ba7f58880", "labelType": "categorical" // values are categorical / continuous }, "timetaken": "26s", "result": { "insightId": "insight_1e2a91cb-c7f0-48b3-9ab0-72014498a441", "driverId": "driver_c9d90505-08ae-4d67-bc5d-61ad2acb886f", "type": "DriverCreateResponse" }, "consumed": true, "jobType": "SegmentDiscoveryInsight", // jobType among trend / cohort / segment discovery
"status": "SUCCESS", "jobId": "0096d8db-e1ad-41e9-a7c9-b9c8fa338e39", "starttime": "2021-03-11T10:16:54.491Z", "createdBy": "superUser", "estimatedResourceSizeBytes": 2663691}

Error Insight notification

If an insight creation has failed, the user would receive a response from the socket with the below Object.

The Object will have

  1. Request info
  2. Reason info: Result will have the below attributes which can be used for the redirection to the insight ex: 
{ "request": { "driverName": "testsegment", "label": "Returned", "options": { "featureselection_featurenames": "Sales,Order_ID”, "featureselection_includefeaturenames": "true", "targetLabel": "No", "treeDepth": "large,small", "sample": "0.1", "createStage": "false" }, "sourceid": "bv_2f76372e-3141-48b7-9e1f-a8320d25cdf9", "createdBy": "003f82b6-2ae7-459f-9cd1-e07baa3978eb", "labelType": "categorical", "timerange": { "type": "today", "datecolumn": "Order_Date" } }, "consumed": false, "reason": { "type": "GenericError", // type of error "code": 1, "message": "Applying filter or timerange is returning 0 rows of data", // reason for the failure "severity": "error" }, "jobType": "SegmentDiscoveryInsight", "status": "FAILURE", "jobId": "d9ad4c93-50f0-42fe-b6ca-2f3ff010e4b0", "starttime": "2021-03-11T11:20:20.475Z",

Web Sockets 

In WebSockets, a connection is established with the SQE service using an auth token. Each communication message is associated with a correlation ID to map the responses to the requests. 

Initialization

Endpoint:  ws://qa.minion.tellius.com:31144/sqeWebSocket

The Connection needs to be validated with an initial req having user token, here is the snippet:

{ "token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpX..."}

Response

{  "userId": "fbd6e7ce-e2b4-4465-98cd-8151570d69d8",  "status": "initialized",  "rId": "5da08f43-0ad5-4a13-932e-7e7f8f64d390"}

Heartbeat

The WebSocket can always be tested for the established connection using a heartbeat call, which also ensures that the socket connection is not timeout under idle.

Testing the connection -  {"requestType": "ping"}Responds with - {"status":"CONNECTED","responseType":"pong"}

Add to Vizpad:

Add to Vizpad, post message uses the following structure.

{ "actionType": "addToVizpad",      "vizpadAndTabs": [{          "vizpadId": "123",          "tabIds":: ["t1", "t2"], //optionalField      },      {          "vizpadId": "324",      }], //optional field      "newVizpadTitle": "abc", //optional field      "viz": viz object that has to be saved in the vizpad}

vizpadAndTabs is an optional field. If this field is not specified, a new Vizpad will be created. This is an array that accepts objects which contain vizpadId and tabIds. vizpadId denotes the id of the Vizpad where the viz has to be added. TabIds is an optional field and it's an array of strings that accepts the ids of the tabs of that Vizpad. If not specified, viz will be added to the first tab of the Vizpad. 

newVizpadTitle is an optional field and it accepts the title of the Vizpad which will be used while creating the Vizpad (when “vizpadAndTabs” is not present)

Viz follows the same structure as the response from the web socket call. 

Sample post message is as follows: In this sample data, we have not given the vizpadid, so it creates a Vizpad and adds this viz to the newly created Vizpad.

{ "actionType": "addToVizpad", "viz": { "vizpad": { "reportLevelColumns": [ "dddddd" ] }, "vizType": "kpi", "tooltips": { "yAxis": [{ "filter": { "valueFilters": { "operator": "and", "negate": false, "id": "viz_66bf3255-5403-4e37-ad99-9f4b2dffc238", "args": [{ "value": "2012", "id": "viz_ccea8d3a-3688-41fc-864c-8c93d25003ba", "condition": "=", "column": { "name": "Order_ID" } }] } }, "columnName": "Profit", "aggregation": "sum" }, { "filter": { "valueFilters": { "operator": "and", "negate": false, "id": "viz_0687bc8b-dd0f-4125-a8ba-9d182306cd74", "args": [{ "value": "2014", "id": "viz_492072fd-b674-4838-a710-ed60e2b4eec5", "condition": "=", "column": { "name": "Order_ID" } }] } }, "columnName": "Profit", "aggregation": "sum" } ] }, "title": "Percentage change in total Profit for Order_ID 2012 compared to 2014", "theme": { "vizBackground": { "transparency": "0.9", "image": "img/test", "color": "white" }, "name": "dark", "color": "black" }, "size": { "width": 200, "height": 100 }, "placement": { "yDistance": 20, "xDistance": 10 }, "metadata": { "language": "english", "format": { "title": { "font": { "weight": "normal", "size": "16", "color": "#000000" }, "enabled": true }, "numberFormats": { "numberFormats": { "Profit_PERCENTAGE_CHANGE": { "suffix": "%" } }, "lastColumn": "Profit", "enabled": true }, "legend": { "font": { "weight": "normal", "size": "14", "color": "#78909c" }, "enabled": true }, "colorPaletteInfo": { "colors": ["#1565C0", "#F57F17", "#558B2F", "#BF360C", "#5E35B1", "#00838F", "#C62828", "#827717", "#E65100", "#5D4037", "#AD1457", "#6A1B9A", "#1976D2", "#F9A825", "#689F38", "#D84315", "#673AB7", "#0097A7", "#D32F2F", "#9E9D24", "#EF6C00", "#6D4C41", "#C2185B", "#7B1FA2", "#42A5F5", "#FFEB3B", "#9CCC65", "#FF8A65", "#9575CD", "#4DD0E1", "#EF5350", "#C0CA33", "#FF9800", "#8D6E63", "#EC407A", "#AB47BC", "#64B5F6", "#FFF176", "#AED581", "#FFAB91", "#B39DDB", "#80DEEA", "#E57373", "#D4E157", "#FFB74D", "#A1887F", "#F06292", "#BA68C8", "#90CAF9", "#FFF59D", "#C5E1A5", "#FFCCBC", "#D1C4E9", "#B2EBF2", "#EF9A9A", "#DCE775", "#FFCC80", "#BCAAA4", "#F48FB1", "#CE93D8"] }, "background": { "enableGrid": false, "color": "#FFFFFF" }, "axes": { "yAxis": { "enabled": true }, "xAxis": { "enabled": true }, "font": { "weight": "normal", "size": "14", "color": "#78909c" } } }, "dualAxis": true, "colorPalette": "401300fe-58ae-42ad-b185-ce1f4a181d73" }, "id": "241f9838-a23f-4348-8a82-b2a22e2fc0db", "chartType": "simpleCount", "businessViewId": "bv_aa3926fe-27bb-46d8-8319-4e233bb5a6c8", "axes": { "yAxis": [{ "format": { "type": "number", "suffix": "%", "display": true }, "expression": { "right": { "name": "Profit", "filter": { "valueFilters": { "operator": "and", "negate": false, "id": "viz_8438cdd1-590c-4d05-941c-03345aab4c01", "args": [{ "value": "2014", "id": "viz_68cc3514-a7bf-4b58-82bc-04ae4a57f02b", "condition": "=", "column": { "name": "Order_ID" } }] } }, "aggregation": "sum" }, "operator": "/", "left": { "right": { "name": "Profit", "filter": { "valueFilters": { "operator": "and", "negate": false, "id": "viz_8438cdd1-590c-4d05-941c-03345aab4c01", "args": [{ "value": "2014", "id": "viz_68cc3514-a7bf-4b58-82bc-04ae4a57f02b", "condition": "=", "column": { "name": "Order_ID" } }] } }, "aggregation": "sum" }, "operator": "-", "left": { "name": "Profit", "filter": { "valueFilters": { "operator": "and", "negate": false, "id": "viz_0c6c35a4-cb56-481b-b502-4206543c58d5", "args": [{ "value": "2012", "id": "viz_7a536125-01e2-4a3e-9664-7ceb3baad813", "condition": "=", "column": { "name": "Order_ID" } }] } }, "aggregation": "sum" } }, "expressionType": "percentage" }, "columnName": "Profit_PERCENTAGE_CHANGE", "aggregation": "" }], "isMultipleAxes": false } }}

Once successfully saved, the post message will be sent back with the following structure if vizpadIds is not used: 

{
"actionType":"ADD_TO_VIZPAD",
"originalVizId":"fe149768-68f4-4306-a032-65bd8c536c72",
"vizpadAndTabs":[
{
"vizpadId":"16f20d5f-5b7e-4ab6-840d-2c4b41c1c390",
"tabs":[
{
"vizId":"22a9b957-5d66-4147-a942-c59f2ae85f6c",
"vizpadId":"16f20d5f-5b7e-4ab6-840d-2c4b41c1c390",
"tabId":"dfc17b74-0578-417f-953f-51a1b5c6d77a",
"message":"Viz successfully saved to vizpad",
"success":true
}
]
}
]

tabId and vizpadId corresponds to the Ids of the Vizpad and tab where the viz has been added with which we can navigate the user to the Vizpad page. 

If vizpadAndTabs is used in the request, the structure will be as follows: 

{   "actionType":"addToVizpad",   "vizpadAndTabs":[      {         "vizpadId":"2cf10398-8a80-4284-85d0-ce801efb6b76",         "tabIds":[                    ]      },      {         "vizpadId":"087ee3ff-1266-45ae-97b8-dd5847ef3d2c",         "tabIds":[                    ]      },      {         "vizpadId":"7c1825cb-5745-465a-a03b-1517e10b6ae7",         "tabIds":[            "bdb3beeb-540a-4d80-832a-7cf6c464e26f",            "bdb3beeb-540a-4d80-832a-7cf6c464e26r"         ]      }   ],   "newVizpadTitle":"New Vizpad - KPI2",   "viz":{      "vizType":"kpi",      "id":"fe149768-68f4-4306-a032-65bd8c536c72",      "title":"Total Profit",      "businessViewId":"bv_cf1fc2e6-69d7-42e4-aa97-40a8f08cbeec",      "theme":{         "name":"dark",         "color":"black",         "vizBackground":{            "color":"white",            "image":"img/test",            "transparency":"0.9"         }      },      "placement":{         "xDistance":0,         "yDistance":0      },      "size":{         "height":4,         "width":4      },      "tab":"574d06c8-ea4a-4f2d-8868-c113350a8ca6",      "tempStorage":{              },      "response":{              },      "chartType":"simpleCount",      "axes":{         "yAxis":[            {               "aggregation":"sum",               "translatedAggregation":"Sum",               "columnName":"Profit",               "title":{                  "fonts":{                     "size":"",                     "weight":"",                     "family":"",                     "underline":"",                     "italic":"",                     "color":"",                     "height":"",                     "width":"",                     "border":"",                     "backgroundColor":"",                     "alignment":"",                     "bulletedText":""                  }               },               "label":{                                },               "geoType":null,               "filter":null,               "marketShareFilter":null,               "expression":null,               "columnWidth":null            }         ],         "isMultipleAxes":false      },      "metadata":{         "anomalies":{            "display":true         },         "dataColors":{            "category":"",            "color":""         },         "colorPalette":"401300fe-58ae-42ad-b185-ce1f4a181d73",         "format":{            "axes":{               "yAxis":{                  "enabled":true               },               "xAxis":{                  "enabled":true               },               "font":{                  "weight":"normal",                  "size":"14",                  "color":"#78909c"               }            },            "title":{               "font":{                  "weight":"normal",                  "size":"16",                  "color":"#000000"               },               "enabled":true            },            "background":{               "enableGrid":false,               "color":"#FFFFFF"            },            "legend":{               "font":{                  "weight":"normal",                  "size":"14",                  "color":"#78909c"               },               "enabled":true            },            "colorPaletteInfo":{               "colors":[                  "#1565C0",                  "#F57F17",                  "#558B2F",                  "#BF360C",                  "#5E35B1",                  "#00838F",                  "#C62828",                  "#827717",                  "#E65100",                  "#5D4037",                  "#AD1457",                  "#6A1B9A",                  "#1976D2",                  "#F9A825",                  "#689F38",                  "#D84315",                  "#673AB7",                  "#0097A7",                  "#D32F2F",                  "#9E9D24",                  "#EF6C00",                  "#6D4C41",                  "#C2185B",                  "#7B1FA2",                  "#42A5F5",                  "#FFEB3B",                  "#9CCC65",                  "#FF8A65",                  "#9575CD",                  "#4DD0E1",                  "#EF5350",                  "#C0CA33",                  "#FF9800",                  "#8D6E63",                  "#EC407A",                  "#AB47BC",                  "#64B5F6",                  "#FFF176",                  "#AED581",                  "#FFAB91",                  "#B39DDB",                  "#80DEEA",                  "#E57373",                  "#D4E157",                  "#FFB74D",                  "#A1887F",                  "#F06292",                  "#BA68C8",                  "#90CAF9",                  "#FFF59D",                  "#C5E1A5",                  "#FFCCBC",                  "#D1C4E9",                  "#B2EBF2",                  "#EF9A9A",                  "#DCE775",                  "#FFCC80",                  "#BCAAA4",                  "#F48FB1",                  "#CE93D8"               ]            },            "axesSlider":{               "sliderValue":0            },            "includeNullsInTQL":null,            "dataLabel":{               "font":{                  "weight":"normal",                  "textOutline":"normal",                  "size":"9",                  "color":"contrast"               },               "enabled":false,               "detailedFormat":false            },            "numberFormats":{               "numberFormats":{                                },               "lastColumn":""            },            "colorFormats":{               "lastColumnAggregation":"",               "lastColumn":"",               "formatBy":"value",               "enabled":false,               "colorFormats":{                                }            },            "benchmark":{               "enabled":false,               "benchmarkEnabled":false            }         },         "dualAxis":true,         "responseMetadata":{                    },         "columnMapping":{                    },         "language":"en"      },      "filters":{              },      "pagination":{         "offset":0,         "isTruncated":false,         "allowPagination":false      },      "tableFields":{         "rows":[                    ],         "columns":[                    ]      },      "possibleBucketInfo":{              },      "isStacked":false,      "stackType":"normal",      "legend":{         "enabled":true,         "position":"",         "maxHeight":"",         "fonts":{            "size":"",            "weight":"",            "family":"",            "underline":"",            "italic":"",            "color":"",            "height":"",            "width":"",            "border":"",            "backgroundColor":"",            "alignment":"",            "bulletedText":""         }      },      "secondaryGroupBy":{              },      "targetLine":{         "display":false,         "value":"",         "label":""      },      "basicChartSelections":{         "isHighlighted":false,         "editMode":false      },      "basicChartInteractions":{              },      "vizpad":{         "id":"2cf10398-8a80-4284-85d0-ce801efb6b76",         "title":"Total Profit",         "sharings":[                    ],         "businessViewId":"bv_cf1fc2e6-69d7-42e4-aa97-40a8f08cbeec",         "newVizes":[                    ],         "resolution":"default",         "vizes":[                    ],         "tabs":[            {               "id":"574d06c8-ea4a-4f2d-8868-c113350a8ca6",               "name":"Tab 1",               "placements":[                  {                     "col":0,                     "row":0,                     "sizeX":4,                     "sizeY":4,                     "vizId":"fe149768-68f4-4306-a032-65bd8c536c72"                  }               ],               "filters":{                  "timeFilters":[                                      ],                  "valueFilters":{                     "operator":"and",                     "negate":false,                     "id":null,                     "args":[                                            ]                  }               }            }         ],         "sharingByLink":true,         "timeRange":{            "type":"all"         },         "thumbnail":"",         "placement":[            {               "sizeY":4,               "sizeX":4,               "col":0,               "row":0,               "vizId":"fe149768-68f4-4306-a032-65bd8c536c72"            }         ],         "sharedWith":[                    ],         "workspaceId":"",         "elements":[                    ],         "settings":{            "gridStructure":null,            "showGridlines":null,            "showVizOverlay":null         },         "createdAt":"2021-04-23T12:10:15.640087",         "updatedAt":"2021-04-23T12:10:17.490485",         "colorPaletteId":"401300fe-58ae-42ad-b185-ce1f4a181d73",         "gradientPaletteId":"6dc17e11-91c0-4fe7-a0f9-c218a04f020b",         "reportLevelColumns":[            "discount_formula"         ],         "isShared":null,         "readOnly":null,         "favorite":false      },      "alreadySaved":true,      "isViewData":false,      "enableSmartBucketing":true,      "fromCache":true   }}

The response to the request is as follows: 

{   "actionType":"ADD_TO_VIZPAD",   "originalVizId":"fe149768-68f4-4306-a032-65bd8c536c72",   "vizpadAndTabs":[      {         "tabs":[            {               "vizId":"4de70cb5-ae5e-4baf-a446-480cd59962a5",               "vizpadId":"2cf10398-8a80-4284-85d0-ce801efb6b76",               "tabId":"574d06c8-ea4a-4f2d-8868-c113350a8ca6",               "message":"Viz successfully saved to vizpad",               "success":true            }         ],         "vizpadId":"2cf10398-8a80-4284-85d0-ce801efb6b76"      },      {         "message":"Invalid vizpad",         "vizpadId":"087ee3ff-1266-45ae-97b8-dd5847ef3d2c",         "success":false      },      {         "tabs":[            {               "vizId":"71bda0e8-61a3-43df-874a-f273040fa0aa",               "vizpadId":"7c1825cb-5745-465a-a03b-1517e10b6ae7",               "tabId":"bdb3beeb-540a-4d80-832a-7cf6c464e26f",               "message":"Viz successfully saved to vizpad",               "success":true            },            {               "message":"Invalid tabId",               "vizpadId":"7c1825cb-5745-465a-a03b-1517e10b6ae7",               "tabId":"bdb3beeb-540a-4d80-832a-7cf6c464e26r",               "success":false            }         ],         "vizpadId":"7c1825cb-5745-465a-a03b-1517e10b6ae7"      }   ]}

Share Vizpad

{ "sharedWithId": "70dac1c8-fd3c-4731-b869-c638ae629372", "objectId": "b5ebc6cc-fce6-40b9-bd15-8d03fb18383b", "objectKind": "vizPad", "permission": "w",// it can be ‘w’ or ‘r’ "sharedWithKind": "user", it can be ‘user’ or ‘group’}

When a user types a query and clicks enter, a post message will be fired with the following structure.

{   "actionType":"SEARCH_QUERY_REQUEST",   "corrId":"4y1XV",   "enterKeyPress":true,   "performQuery":true,   "query":"show total profit"}

Once the result is received, a post message will be fired with the following structure:

{   "actionType":"SEARCH_QUERY_RESPONSE",   "vizResponse":{      "vizResponseType":"kpi",      "viz":{         "vizType":"kpi",         "title":"Total profit",         "theme":{            "vizBackground":{               "transparency":"0.9",               "image":"img/test",               "color":"white"            },            "name":"dark",            "color":"black"         },         "size":{            "width":200,            "height":100         },         "placement":{            "yDistance":20,            "xDistance":10         },         "metadata":{            "language":"english",            "format":{               "title":{                  "font":{                     "weight":"normal",                     "size":"16",                     "color":"#000000"                  },                  "enabled":true               },               "legend":{                  "font":{                     "weight":"normal",                     "size":"14",                     "color":"#78909c"                  },                  "enabled":true               },               "colorPaletteInfo":{                  "colors":[                     "#1565C0",                     "#F57F17",                     "#558B2F",                     "#BF360C",                     "#5E35B1",                     "#00838F",                     "#C62828",                     "#827717",                     "#E65100",                     "#5D4037",                     "#AD1457",                     "#6A1B9A",                     "#1976D2",                     "#F9A825",                     "#689F38",                     "#D84315",                     "#673AB7",                     "#0097A7",                     "#D32F2F",                     "#9E9D24",                     "#EF6C00",                     "#6D4C41",                     "#C2185B",                     "#7B1FA2",                     "#42A5F5",                     "#FFEB3B",                     "#9CCC65",                     "#FF8A65",                     "#9575CD",                     "#4DD0E1",                     "#EF5350",                     "#C0CA33",                     "#FF9800",                     "#8D6E63",                     "#EC407A",                     "#AB47BC",                     "#64B5F6",                     "#FFF176",                     "#AED581",                     "#FFAB91",                     "#B39DDB",                     "#80DEEA",                     "#E57373",                     "#D4E157",                     "#FFB74D",                     "#A1887F",                     "#F06292",                     "#BA68C8",                     "#90CAF9",                     "#FFF59D",                     "#C5E1A5",                     "#FFCCBC",                     "#D1C4E9",                     "#B2EBF2",                     "#EF9A9A",                     "#DCE775",                     "#FFCC80",                     "#BCAAA4",                     "#F48FB1",                     "#CE93D8"                  ]               },               "background":{                  "enableGrid":false,                  "color":"#FFFFFF"               },               "axes":{                  "yAxis":{                     "enabled":true                  },                  "xAxis":{                     "enabled":true                  },                  "font":{                     "weight":"normal",                     "size":"14",                     "color":"#78909c"                  }               }            },            "dualAxis":true,            "colorPalette":"401300fe-58ae-42ad-b185-ce1f4a181d73"         },         "id":"5f6b92e5-6711-4c8b-841f-763cf9f7b171",         "chartType":"simpleCount",         "businessViewId":"bv_d5dfeeb5-9a4a-4fac-92a0-a51a07da52d9",         "axes":{            "yAxis":[               {                  "columnName":"profit",                  "aggregation":"sum"               }            ],            "isMultipleAxes":false         }      },      "tooltip":[         {            "translatedAggregation":"sum",            "originalValue":2698921,            "isYAxis":true,            "isXAxis":false,            "isGroupBy":false,            "formattedValue":"2.7M",            "columnName":"profit",            "alias":"profit",            "aggregation":"sum"         }      ],      "responseText":"**Total profit** is **2698921**",      "possibleTransitions":[         "funnel",         "detailTable",         "simpleCount",         "radialProgress",         "viewData",         "interactiveTable",         "histogram",         "bar",         "column",         "barConversion",         "table"      ],      "possibleBucketInfo":{         "possibleBuckets":{            "measureType":{               "values":{                  "tooltips":5,                  "measures":0               }            }         }      },      "metadata":{         "tqlResponseRowCount":1,         "totalRowCount":0,         "timeTakenInMilliSeconds":244,         "responseDataCount":1      },      "count":"2.7M",      "columns":[         {            "name":"profit",            "format":{               "type":"number",               "isCommaSeparated":false,               "displayUnit":"default",               "decimals":2            },            "datasetName":"bv_guide_query",            "datasetId":"bv_d5dfeeb5-9a4a-4fac-92a0-a51a07da52d9",            "aggregation":"sum"         }      ],      "columnDetails":{         "measureType":[            {               "column":{                  "name":"profit",                  "isWeekEndDate":false,                  "aggregation":"sum"               },               "bucket":"measures"            }         ],         "dimensionType":[                    ],         "dateType":[                    ]      }   },   "responseType":"vizResponse",   "metadata":{      "witResponse":{         "query":"show total profit",         "intent":"Chart",         "entities":{            "businessViewId":[               {                  "value":{                     "value":"bv_d5dfeeb5-9a4a-4fac-92a0-a51a07da52d9",                     "type":"string"                  },                  "start":0,                  "end":0,                  "confidence":1               }            ],            "aggregatedField":[               {                  "value":{                     "type":"aggregation",                     "columnStartIndexInQuery":11,                     "aggregationField":{                        "name":"profit",                        "isExpression":false,                        "datasetName":"bv_guide_query",                        "datasetId":"bv_d5dfeeb5-9a4a-4fac-92a0-a51a07da52d9",                        "databaseTable":"bv_d5dfeeb5-9a4a-4fac-92a0-a51a07da52d9"                     },                     "aggregation":"total"                  },                  "start":5,                  "end":17,                  "confidence":1               }            ]         },         "confidence":0.9183534383773804      },      "tokens":[         {            "type":"measure",            "tokenString":"total profit",            "suggestions":[               {                  "type":"measure",                  "tokenString":"avg profit",                  "suggestions":[                                      ],                  "column":{                     "name":"profit"                  },                  "aggregation":"avg"               },               {                  "type":"measure",                  "tokenString":"min profit",                  "suggestions":[                                      ],                  "column":{                     "name":"profit"                  },                  "aggregation":"min"               },               {                  "type":"measure",                  "tokenString":"max profit",                  "suggestions":[                                      ],                  "column":{                     "name":"profit"                  },                  "aggregation":"max"               },               {                  "type":"measure",                  "tokenString":"total profit",                  "suggestions":[                                      ],                  "column":{                     "name":"profit"                  },                  "aggregation":"total"               },               {                  "type":"measure",                  "tokenString":"marketShare profit",                  "suggestions":[                                      ],                  "column":{                     "name":"profit"                  },                  "aggregation":"marketShare"               },               {                  "type":"measure",                  "tokenString":"sum cost",                  "suggestions":[                                      ],                  "column":{                     "name":"cost"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum customer_id",                  "suggestions":[                                      ],                  "column":{                     "name":"customer_id"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum revenue",                  "suggestions":[                                      ],                  "column":{                     "name":"revenue"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum store_id",                  "suggestions":[                                      ],                  "column":{                     "name":"store_id"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum competition_distance",                  "suggestions":[                                      ],                  "column":{                     "name":"competition_distance"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum store_lat",                  "suggestions":[                                      ],                  "column":{                     "name":"store_lat"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum store_lon",                  "suggestions":[                                      ],                  "column":{                     "name":"store_lon"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum store_zip",                  "suggestions":[                                      ],                  "column":{                     "name":"store_zip"                  },                  "aggregation":"sum"               },               {                  "type":"measure",                  "tokenString":"sum age",                  "suggestions":[                                      ],                  "column":{                     "name":"age"                  },                  "aggregation":"sum"               }            ],            "start":5,            "end":17,            "column":{               "name":"profit"            },            "aggregation":"sum"         }      ],      "suggestions":[              ],      "rowsCount":1,      "responseType":"viz",      "original":"show total profit",      "filterDescriptions":[              ],      "chartType":"simpleCount",      "chartTitle":"Total profit",      "BVId":"bv_d5dfeeb5-9a4a-4fac-92a0-a51a07da52d9"   },   "corrId":"4y1XV",   "filterDescriptions":[        ]}

Did we help you?

Insights Enhancements

Contact