Forum Discussion
JHingst
Jan 31, 2023Copper Contributor
Column Formatting Data Bars under Text
Hi everyone! I am trying to optimize a list of tasks and would love a choice column with 5 choices outlining the latest status on the projects that are populating the list. I.e. 5 "milestones" along...
- Jan 31, 2023
JHingst you'll probably want a choice option for 100% as well. The JSON column formatting (advanced mode) is as follows:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "span", "txtContent": "@currentField", "style": { "padding-left": "2px", "white-space": "nowrap" } } ], "attributes": { "class": "sp-field-dataBars" }, "style": { "padding": "0", "background-color": "#faf0dc", "width": "=if(@currentField == 100, '100%', (@currentField * 1) + '%')" } }
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
ganeshsanap
Jan 31, 2023MVP
JHingst Check below samples, it should help you:
1. How to create a progress bar that updates on status change
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.