{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "hideColumnHeader": true,
  "hideSelection": true,
  "rowFormatter": {
    "elmType": "div",
    "style": {
      "width": "90%",
      "height": "90px",
      "display": "flex",
      "flex-direction": "column",
      "margin-left": "40px",
      "margin-right": "40px"
    },
    "children": [
      {
        "elmType": "div",
        "txtContent": "[$Title]",
        "style": {
          "width": "100%",
          "height": "100%",
          "display": "flex",
          "align-items": "center",
          "justify-content": "center",
          "padding": "5px"
        },
        "attributes": {
          "class": "ms-fontSize-28"
        }
      },
      {
        "elmType": "div",
        "style": {
          "width": "100%",
          "display": "flex",
          "flex-direction": "row",
          "box-shadow": "0px 7px 29px 0px #ccc"
        },
        "children": [
          {
            "elmType": "div",
            "style": {
              "width": "= (([$Entity1] * 100) / ([$Entity1] + [$Entity2])) + '%'",
              "height": "45px",
              "cursor": "pointer",
              "display": "flex",
              "flex-direction": "row",
              "align-items": "center",
              "justify-content": "center"
            },
            "txtContent": "=([$Entity1] + if([$IsPercent], '%', ''))",
            "attributes": {
              "class": "ms-fontSize-20 ms-bgColor-blue ms-bgColor-blueDark--hover ms-fontColor-white"
            },
            "customCardProps": {
              "directionalHint": "bottomCenter",
              "isBeakVisible": true,
              "openOnEvent": "hover",
              "formatter": {
                "elmType": "div",
                "style": {
                  "width": "200px",
                  "height": "100px",
                  "display": "flex",
                  "flex-direction": "column",
                  "align-items": "center",
                  "justify-content": "center",
                  "padding": "5px"
                },
                "children": [
                  {
                    "elmType": "div",
                    "style": {
                      "text-align": "center"
                    },
                    "txtContent": {
                      "operator": "+",
                      "operands": [
                        "=([$Entity1] + if([$IsPercent], '%', ''))",
                        " ",
                        "=toLowerCase([$Title])",
                        " for ",
                        "[!Entity1.DisplayName]"
                      ]
                    },
                    "attributes": {
                      "class": "ms-fontSize-20 ms-fontColor-blue"
                    }
                  }
                ]
              }
            }
          },
          {
            "elmType": "div",
            "style": {
              "width": "= (([$Entity2] * 100) / ([$Entity1] + [$Entity2])) + '%'",
              "height": "45px",
              "cursor": "pointer",
              "display": "flex",
              "flex-direction": "row",
              "align-items": "center",
              "justify-content": "center"
            },
            "txtContent": "=([$Entity2] + if([$IsPercent], '%', ''))",
            "attributes": {
              "class": "ms-fontSize-20 ms-bgColor-red ms-bgColor-redDark--hover ms-fontColor-white"
            },
            "customCardProps": {
              "directionalHint": "bottomCenter",
              "isBeakVisible": true,
              "openOnEvent": "hover",
              "formatter": {
                "elmType": "div",
                "style": {
                  "width": "200px",
                  "height": "100px",
                  "display": "flex",
                  "flex-direction": "column",
                  "align-items": "center",
                  "justify-content": "center",
                  "padding": "5px"
                },
                "children": [
                  {
                    "elmType": "div",
                    "style": {
                      "text-align": "center"
                    },
                    "txtContent": {
                      "operator": "+",
                      "operands": [
                        "=([$Entity2] + if([$IsPercent], '%', ''))",
                        " ",
                        "=toLowerCase([$Title])",
                        " for ",
                        "[!Entity2.DisplayName]"
                      ]
                    },
                    "attributes": {
                      "class": "ms-fontSize-20 ms-fontColor-red"
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  }
}