Span использует заголовок в качестве всплывающей подсказки, поэтому вы можете установить заголовок как подробное описание для каждого диапазона.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"style": {
"font-size": "16px"
},
"children": [
{
"elmType": "span",
"attributes": {
"title": "Water Description",
"iconName": "Precipitation",
"class": "='ms-fontColor-' + if(indexOf(join(@currentField,''),'Water') != -1, 'themeDark', 'neutralLight')"
},
"style": {
"padding": "0 2px"
}
},
{
"elmType": "span",
"attributes": {
"title": "Coffee Description",
"iconName": "CoffeeScript",
"class": "='ms-fontColor-' + if(indexOf(join(@currentField,''),'Coffee') != -1, 'themeDark', 'neutralLight')"
},
"style": {
"padding": "0 2px 0 0"
}
},
{
"elmType": "span",
"attributes": {
"title": "Wine Description",
"iconName": "Wines",
"class": "='ms-fontColor-' + if(indexOf(join(@currentField,''),'Wine') != -1, 'themeDark', 'neutralLight')"
},
"style": {
"padding": "0 2px"
}
},
{
"elmType": "span",
"attributes": {
"title": "Beer Description",
"iconName": "BeerMug",
"class": "='ms-fontColor-' + if(indexOf(join(@currentField,''),'Beer') != -1, 'themeDark', 'neutralLight')"
},
"style": {
"padding": "0 2px"
}
},
{
"elmType": "span",
"attributes": {
"title": "\"Juice Description more...\"",
"iconName": "MusicInCollectionFill",
"class": "='ms-fontColor-' + if(indexOf(join(@currentField,''),'\"Juice\"') != -1, 'themeDark', 'neutralLight')"
},
"style": {
"padding": "0 2px"
}
}
]
}
Есть много значков, которые вы можете использовать.
https://developer.microsoft.com/en-us/fabric#/styles/icons#icons