{
  "version": "2.0",
  "title": "ArcGIS Join Showcase",
  "theme": {
    "mode": "light",
    "primaryColor": "#2563eb",
    "accentColor": "#0f766e",
    "surfaceColor": "#ffffff",
    "textColor": "#172033",
    "borderColor": "#dbe3ec",
    "radius": 10,
    "gap": 12
  },
  "components": [
    {
      "type": "map",
      "id": "arcgis-join-showcase",
      "title": "Joined Facility Workload",
      "subtitle": "Public feature geometry joined to fictional Power BI work data.",
      "span": 12,
      "heightMode": "aspectRatio",
      "aspectRatio": 1.75,
      "minHeight": 380,
      "view": {
        "center": [
          29.74,
          -95.4
        ],
        "zoom": 10,
        "fitMode": "data",
        "fitPadding": 0.1,
        "preserveView": true
      },
      "basemap": {
        "type": "osm"
      },
      "featureDetails": {
        "mode": "auto",
        "clearSelectionOnBackgroundClick": true,
        "clearSelectionOnClose": false
      },
      "search": {
        "enabled": false
      },
      "layers": [
        {
          "id": "joined-facilities",
          "name": "ArcGIS Feature — Joined Facilities",
          "dataset": "powerbi",
          "source": {
            "type": "arcgisFeature",
            "url": "https://geogimstest.houstontx.gov/arcgis/rest/services/HW/WastewaterUNPublic/MapServer/9",
            "mode": "join",
            "outFields": [
              "facilityid"
            ],
            "useServiceRenderer": false,
            "useServiceLabels": false,
            "refreshIntervalMinutes": 5
          },
          "join": {
            "enabled": true,
            "powerBiField": "facility_id",
            "serviceField": "facilityid",
            "cardinality": "oneToOne",
            "keyType": "string",
            "normalization": [
              "trim",
              "upper"
            ],
            "powerBiDuplicatePolicy": "error",
            "serviceDuplicatePolicy": "error",
            "unmatchedPolicy": "diagnose",
            "queryStrategy": "keyBatches"
          },
          "renderer": {
            "type": "uniqueValue",
            "field": "priority",
            "fieldSource": "powerbi",
            "values": [
              {
                "value": "High",
                "label": "High Priority",
                "symbol": {
                  "shape": "circle",
                  "fillColor": "#b91c1c",
                  "outlineColor": "#ffffff",
                  "outlineWidth": 2,
                  "radius": 9
                }
              },
              {
                "value": "Medium",
                "label": "Medium Priority",
                "symbol": {
                  "shape": "circle",
                  "fillColor": "#d97706",
                  "outlineColor": "#ffffff",
                  "outlineWidth": 2,
                  "radius": 8
                }
              },
              {
                "value": "Routine",
                "label": "Routine",
                "symbol": {
                  "shape": "circle",
                  "fillColor": "#0f766e",
                  "outlineColor": "#ffffff",
                  "outlineWidth": 2,
                  "radius": 7
                }
              }
            ]
          },
          "tooltip": {
            "enabled": true,
            "fields": [
              {
                "field": "status",
                "fieldSource": "powerbi",
                "label": "Status"
              },
              {
                "field": "priority",
                "fieldSource": "powerbi",
                "label": "Priority"
              }
            ]
          },
          "popup": {
            "defaultFieldSource": "service",
            "title": "Facility {{facilityid}}",
            "fields": [
              {
                "field": "status",
                "fieldSource": "powerbi",
                "label": "Status",
                "display": "badge"
              },
              {
                "field": "work_count",
                "fieldSource": "powerbi",
                "label": "Open Work",
                "format": "integer"
              },
              {
                "field": "priority",
                "fieldSource": "powerbi",
                "label": "Priority"
              }
            ],
            "mode": "custom"
          },
          "interaction": {
            "enabled": true,
            "trigger": "click",
            "internalMode": "highlight",
            "externalMode": "selection",
            "multiSelect": true,
            "clearOnSecondClick": false
          },
          "legend": {
            "visible": true,
            "title": "Joined Priority"
          },
          "performance": {
            "maxFeatures": 12,
            "requestBatchSize": 12,
            "viewportQuery": false,
            "cacheMinutes": 0
          },
          "visible": true,
          "opacity": 1,
          "order": 10
        }
      ],
      "layerPanel": {
        "visible": true,
        "position": "right",
        "defaultOpen": false,
        "allowViewerReorder": true,
        "allowViewerOpacity": true,
        "allowViewerLabels": false
      },
      "legend": {
        "defaultOpen": true
      },
      "toolbar": {
        "visible": true,
        "home": true,
        "layers": true,
        "legend": true,
        "search": false,
        "clearSelection": true,
        "zoomToSelection": true,
        "bookmarks": false
      }
    }
  ]
}
