Enhancing your entities’ gridview with metrics offers valuable insights into grid-related metrics and expands your capacity to showcase additional data.
In the rideGridTable json file, you will add a new column to display MPH metrics as seen on lines between the
{
"label": "Ride Category",
"flex": 0,
"width": 160,
"cell": {
"default": {
"instanceOf": "tooltip",
"truncate": true,
"trigger": {
"instanceOf": "string",
"path": [
"attributes(ride_category)"
]
}
}
}
},
<Start>
{
"label": "MPH",
"flex": 0,
"width": 66,
"cell": {
"default": {
"path": "metrics(ugottaride:miles_per_hour, 'ugottaride').value",
"instanceOf": "number",
"minimumFractionDigits": 1
}
},
"sortable": true,
"cellStyle": {
"textAlign": "right"
},
"headerStyle": {
"justifyContent": "end"
}
}
<End>
Before applying these modifications to your solution, you have the option to validate them in the Authoring Tool.
Before:
After: