{
  "title": "popupElement media",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "Configures media in popup elements.",
  "properties": {
    "mediaInfos": {
      "type": "array",
      "description": "An array of `mediaInfo` objects representing an image or chart for display. If no `mediaInfos` property is provided, the popupElement will display whatever is specified in the `popupInfo.mediaInfos` property.",
      "items": {
        "type": "object",
        "$ref": "mediaInfo_schema.json"
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "media"
      ]
    }
  },
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "esriDocumentation": {
    "additionalInformation": "Each popupElement has a `type` property. This string value indicates the type of popupElement used.",
    "examples": [
      {
        "title": "popupElement media imag",
        "code": {
          "popupElements": [
            {
              "mediaInfos": [
                {
                  "type": "image",
                  "title": "<div><p style='font-weight:bold;'><span>Image</span></p></div>",
                  "caption": "<div><p><span>californiaa flag</span></p><p><span /></p></div>",
                  "value": {
                    "sourceURL": "http://www.50states.com/flag/image/nunst0006.gif"
                  }
                }
              ],
              "type": "media"
            }
          ]
        }
      },
      {
        "title": "popupElement media chart",
        "code": {
          "popupElements": [
            {
              "mediaInfos": [
                {
                  "type": "columnchart",
                  "title": "<div><p style='font-weight:bold;'><span>Chart</span></p></div>",
                  "caption": "<div><p><span style=\"color:#DF73FF;\">This shows Rotation and size.</span></p></div>",
                  "value": {
                    "fields": [
                      "rotation",
                      "size"
                    ]
                  }
                }
              ],
              "type": "media"
            }
          ]
        }
      }
    ]
  }
}
