Back to column formats
Column formattingSharePoint Online

Timeline Format

This sample demonstrates displaying a timeline in a column. If the column value is empty, no circle will be displayed. The content of the column will be shown in a popup when you click on the dot.

Timeline Format formatting preview
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

Column formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "position": "relative",
    "width": "100%",
    "height": "80px"
  },
  "children": [
    {
      "elmType": "div",
      "style": {
        "position": "absolute",
        "display": "flex",
        "align-items": "center",
        "justify-content": "center",
        "width": "100%",
        "height": "100%"
      },
      "children": [
        {
          "elmType": "div",
          "style": {
            "width": "5px",
            "height": "100%"
          },
          "attributes": {
            "class": "ms-bgColor-neutralSecondaryAlt"
          }
        }
      ]
    },
    {
      "elmType": "div",
      "style": {
        "position": "absolute",
        "display": "=if(@currentField, 'flex' , 'none')",
        "align-items": "center",
        "justify-content": "center",
        "width": "100%",
        "height": "100%"
      },
      "children": [
        {
          "elmType": "div",
          "style": {
            "width": "25px",
            "height": "25px",
            "border-radius": "50%",
            "cursor": "pointer"
          },
          "attributes": {
            "class": "ms-bgColor-themePrimary"
          },
          "customCardProps": {
            "directionalHint": "rightCenter",
            "openOnEvent": "click",
            "isBeakVisible": true,
            "formatter": {
              "elmType": "div",
              "style": {
                "width": "400px",
                "height": "200px",
                "padding": "10px 20px 10px 20px"
              },
              "children": [
                {
                  "elmType": "div",
                  "txtContent": "@currentField",
                  "style": {
                    "width": "100%",
                    "height": "100%"
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]
}

From the contributor

How to use this sample

Summary

This sample demonstrates displaying a timeline in a column. If the column value is empty, no circle will be displayed. The content of the column will be shown in a popup when you click on the dot.

screenshot of the sample

View requirements

This format can be applied to any column type.

Sample

Solution Author(s)
generic-timeline.json Tetsuya Kawahara

Version history

Version Date Comments
1.0 May 14, 2021 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.