Configure custom charts for numerical values in the Profile view
Learn about facts that show data based on a numerical value.
Custom charts enable you to display profile information based on the numerical value of an attribute. You can use these charts to present meaningful visual indicators that help quickly understand profile information.
For example, suppose you want to display the loyalty status of an entity. The numerical attribute Loyalty points determines whether the entity is a Silver, Gold, or Platinum member. You can configure a custom script that displays a different icon and label for each membership level.
Here's a sample custom chart:
Let's configure the facet with a different icon for each status. Edit your UI JSON configuration file, navigate to the profiles section, and add the custom script configuration.
The following example shows the custom chart configuration:
{
"id": "TestDialog_numbers",
"caption": "<caption>",
"component": "custom",
"ranges": [
{
"0": {
"label": "Simple member",
"icon": "https://s3.amazonaws.com/reltio.qa.ih/thumbnailInew/djVhVAGO88c7Pw9wDy38PsgAx.jpg"
},
"50": {
"label": "Silver member",
"icon": "https://s3.amazonaws.com/reltio.qa.ih/previewnew/3C4tvaLJZMhijBcmvhg7aZqS0.jpg"
},
"80": {
"label": "Platinum member",
"icon": "https://s3.amazonaws.com/reltio.qa.ih/previewnew/w5kyF5NlYyVUinUkwZeyVeajy.jpg"
}
},
"attributeUri": "configuration/entityTypes/HCP/attributes/Int",
"embedded": true,
"action": {
"files": [
"https://reltio-ui-files.s3.amazonaws.com/custom-scripts/numericAttrView.js"
]
}
}Each key in ranges represents the minimum attribute value for that tier. For example, an attribute value of 50 or higher displays the Silver member icon and label, and this continues until the next threshold (65, for Gold) is reached.
action:files section of the example above is not configurable. You must use the exact URL shown, without modification.