{
  "$schema": "https://vega.github.io/schema/vega/v5.json",
  "width": 200,
  "height": 200,
  "padding": 5,

  "signals": [
    { "name": "startAngle", "value": -0.73,
      "bind": {"input": "range", "min": -6.28, "max": 6.28} },
    { "name": "endAngle", "value": 0.73,
      "bind": {"input": "range", "min": -6.28, "max": 6.28} },
    { "name": "padAngle", "value": 0,
      "bind": {"input": "range", "min": 0, "max": 1.57} },
    { "name": "innerRadius", "value": 0,
      "bind": {"input": "range", "min": 0, "max": 100, "step": 1} },
    { "name": "outerRadius", "value": 50,
      "bind": {"input": "range", "min": 0, "max": 100, "step": 1} },
    { "name": "cornerRadius", "value": 0,
      "bind": {"input": "range", "min": 0, "max": 50, "step": 1} },
    { "name": "strokeWidth", "value": 4,
      "bind": {"input": "range", "min": 0, "max": 10, "step": 0.5} },
    { "name": "color", "value": "both",
      "bind": {"input": "radio", "options": ["fill", "stroke", "both"]} },
    { "name": "x", "value": 100 },
    { "name": "y", "value": 100 }
  ],

  "marks": [
    {
      "type": "symbol",
      "interactive": false,
      "encode": {
        "enter": {
          "fill": {"value": "firebrick"},
          "size": {"value": 25}
        },
        "update": {
          "x": {"signal": "x"},
          "y": {"signal": "y"}
        }
      }
    },
    {
      "type": "arc",
      "encode": {
        "enter": {
          "fill": {"value": "#939597"},
          "stroke": {"value": "#652c90"}
        },
        "update": {
          "x": {"signal": "x"},
          "y": {"signal": "y"},
          "startAngle": {"signal": "startAngle"},
          "endAngle": {"signal": "endAngle"},
          "innerRadius": {"signal": "innerRadius"},
          "outerRadius": {"signal": "outerRadius"},
          "cornerRadius": {"signal": "cornerRadius"},
          "padAngle": {"signal": "padAngle"},
          "strokeWidth": {"signal": "strokeWidth"},
          "opacity": {"value": 1},
          "fillOpacity": {"signal": "color === 'fill' || color === 'both' ? 1 : 0"},
          "strokeOpacity": {"signal": "color === 'stroke' || color === 'both' ? 1 : 0"}
        },
        "hover": {
          "opacity": {"value": 0.5}
        }
      }
    }
  ]
}
