...
Code Block | ||
---|---|---|
| ||
{ "id": "vgp4kn2foljcec5r", "name": "turnover_indicator_drill", "type": "indicatorDrill", "content": { "blocks": [ { "type": "distribution", "onDashboard": true } ] }, "accessInfo": { "createdAt": "2020-06-29T13:49:06Z", "modifiedAt": "2020-06-30T08:18:22Z", "createdBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7", "modifiedBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7" }, "links": [ { "rel": "self", "href": "/rest/projects/k5t8mf2a80tay2ng/md/indicatorDrills/vgp4kn2foljcec5r" } ] } |
The distribution block has now appeared in the indicator drill.
...
This block has the onDashboard
property set to true, which means it will also be present on dashboard! This is another addition which can help you spice up your dashboard.
...
Ranking block
Add a ranking block and push the object. This block orders all objects in the map based on the value of selected indicator.
...
Code Block | ||
---|---|---|
| ||
{ "id": "vgp4kn2foljcec5r", "name": "turnover_indicator_drill", "type": "indicatorDrill", "content": { "blocks": [ { "type": "distribution", }, "onDashboard": true }, { "type": "ranking" } ] }, "accessInfo": { "createdAt": "2020-06-29T13:49:06Z", "modifiedAt": "2020-06-30T08:18:22Z", "createdBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7", "modifiedBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7" }, "links": [ { "rel": "self", "href": "/rest/projects/k5t8mf2a80tay2ng/md/indicatorDrills/vgp4kn2foljcec5r" } ] } |
...
Code Block | ||
---|---|---|
| ||
{ "id": "vgp4kn2foljcec5r", "name": "turnover_indicator_drill", "type": "indicatorDrill", "content": { "blocks": [ { "type": "distribution", "onDashboard": true }, { "type": "ranking" }, { "type": "timeSeries" } ] }, "accessInfo": { "createdAt": "2020-06-29T13:49:06Z", "modifiedAt": "2020-06-30T08:18:22Z", "createdBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7", "modifiedBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7" }, "links": [ { "rel": "self", "href": "/rest/projects/k5t8mf2a80tay2ng/md/indicatorDrills/vgp4kn2foljcec5r" } ] } |
...
Code Block | ||
---|---|---|
| ||
{ "id": "vgp4kn2foljcec5r", "name": "turnover_indicator_drill", "type": "indicatorDrill", "content": { "blocks": [ { "type": "distribution", }, "onDashboard": true { }, { "type": ""type": "ranking" }, { "type": "timeSeries" }, { "type": "categories", "title": "Turnover by customer age and sex", "description": "Turnover by customer age and sex", "splitProperty": "customers.age_group", "orderBy": { "property": "customers.age_group", "direction": "asc" }, "dualProperty": "customers.sex", "label": "Age groups" }, { "type": "categories", "title": "Turnover by channel", "description": "Turnover by channel", "splitProperty": "transactions.channel" }, { "type": "categories", "title": "Turnover by day of week", "description": "Turnover by day of week", "splitProperty": "transactions.day_name", "orderBy": { "property": "transactions.day_index", "direction": "asc" }, "vertical": true } ] }, "accessInfo": { "createdAt": "2020-06-29T13:49:06Z", "modifiedAt": "2020-06-30T08:18:22Z", "createdBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7", "modifiedBy": "/rest/accounts/00ubfu7fdyIoFKxXm0h7" }, "links": [ { "rel": "self", "href": "/rest/projects/k5t8mf2a80tay2ng/md/indicatorDrills/vgp4kn2foljcec5r" } ] } |
...
Click on the Visualize icon and the map will become colorized.
...
Adding drill blocks to dashboard
You can add all the blocks directly to dashboard.
...
They will be displayed under your indicator. Edit business_overview_dashboard.json
indicator block with turnover_indicator
.
Code Block |
---|
...
{
"type": "indicator",
"indicator": "/rest/projects/$projectId/md/indicators?name=turnover_indicator",
"indicatorDrill": "/rest/projects/$projectId/md/indicatorDrills?name=turnover_indicator_drill",
"layout": "primary",
"blockRows": [
{
"type": "distribution"
}
]
},
... |
...
Info |
---|
That's it! In the next tutorial, we will upload a new dataset - shops, and visualize it using markers. |