Forum Discussion
Highlighting support for table data view mapping
- 4 years ago
Hi Anonymous,
The custom visuals team aren't particularly active on the forums, so feature requests usually aren't picked-up from here. It's probably best to create an issue in the GitHub repository or email [email protected]) if you have a request for the visuals SDK.
To manage your expectations, the core table visual doesn't support highlighting so this may not be an easy ask for the team to enable for the table data view mapping in custom visuals.
To work around this limitation, you could use a categorical data view mapping with a single data role, which is bound to both categories and values, e.g.:
{ "dataRoles": [ { "displayName": "Values", "name": "values", "kind": "GroupingOrMeasure" } ], "objects": {}, "dataViewMappings": [ { "categorical": { "categories": { "select": [{ "bind": { "to": "values" } }] }, "values": { "select": [{ "bind": { "to": "values" } }] } } } ], "supportsHighlight": true }Note that you will need to process your data view appropriately in your ViewModel to check for the presence of both the categories and values arrays.
This approach is how we present a flexible table-like data view in Deneb, but can leverage the interactivity features that are not supported for the table mapping. I'm currently working on bringing highlight support in using this structure soon and it's looking quite promising, so you may be able to use a similar approach if you need to move forward with your work.
Regards,
Daniel
Hi Anonymous,
The custom visuals team aren't particularly active on the forums, so feature requests usually aren't picked-up from here. It's probably best to create an issue in the GitHub repository or email [email protected]) if you have a request for the visuals SDK.
To manage your expectations, the core table visual doesn't support highlighting so this may not be an easy ask for the team to enable for the table data view mapping in custom visuals.
To work around this limitation, you could use a categorical data view mapping with a single data role, which is bound to both categories and values, e.g.:
{
"dataRoles": [
{
"displayName": "Values",
"name": "values",
"kind": "GroupingOrMeasure"
}
],
"objects": {},
"dataViewMappings": [
{
"categorical": {
"categories": {
"select": [{ "bind": { "to": "values" } }]
},
"values": {
"select": [{ "bind": { "to": "values" } }]
}
}
}
],
"supportsHighlight": true
}
Note that you will need to process your data view appropriately in your ViewModel to check for the presence of both the categories and values arrays.
This approach is how we present a flexible table-like data view in Deneb, but can leverage the interactivity features that are not supported for the table mapping. I'm currently working on bringing highlight support in using this structure soon and it's looking quite promising, so you may be able to use a similar approach if you need to move forward with your work.
Regards,
Daniel