I need to do a databar format on a choice column with text inside. Is this possible? I can get it easily enough with the given JSON formatting code but i cannot seem edit the code below enough to where it gives me why I need. My choice are New, Approved, Scoping, and Completed.
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "span", "txtContent": "@currentField", "style": { "padding-left": "8px", "white-space": "nowrap" } } ], "attributes": { "class": "sp-field-dataBars" }, "style": { "padding": "0", "width": "=if(@currentField >= 20, '100%', (@currentField * 5) + '%')" } }