Forum Discussion

dKayt's avatar
dKayt
Copper Contributor
Mar 13, 2024
Solved

View formating - How to make defined area clickable

  Hello, I'm formating a SharePoint List and I want to make certain area clickable. Somehow I just have one area clickable.  Does anyone know if I am making a mistake? Thanks, dKayt Here ist my...
  • dKayt's avatar
    dKayt
    Mar 14, 2024

    Hi ganeshsanap 

    Thanks for replying.

    I change the structure of my code and it works now:

    "children": [
          {
            "elmType": "svg",
            "attributes": {
              "viewBox": "0 0 1100 300"
            },
            "style": {
              "opacity": "1",
              "stroke": "green"
            },
            "children": [
              {
                "elmType": "a",
                "attributes": {
                  "href": "[$href]",
                  "alt": "[$alt]",
                  "target": "_blank"
                },
                "children": [
                  {
                    "elmType": "path",
                    "attributes": {
                      "title": "[$Title]",
                      "d": "[$coords]"
                    },
                    "style": {
                      "fill": "red"
                    },
                    "customCardProps": {
                      "openOnEvent": "hover",
                      "formatter": {
                        "elmType": "div",
                        "txtContent": "[$Title]",
                        "style": {
                          "padding": "10px"
                        }
                      },
                      "isBeakVisible": true
                    }
                  }
                ]
              }
            ]
          }
        ]

    Best Regards, dKayt

Resources