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

  "signals": [
    { "name": "shape", "value": "circle",
      "bind": {"input": "select", "options": [
        "arrow", "circle", "square", "cross", "diamond", "triangle",
        "triangle-up", "triangle-down", "triangle-right", "triangle-left",
        "wedge", "stroke",
        "M-1,-1H1V1H-1Z",
        "M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6,.8L0,.5Z"
      ]
    } },
    { "name": "angle", "value": 0,
      "bind": {"input": "range", "min": -360, "max": 360, "step": 1} },
    { "name": "size", "value": 2000,
      "bind": {"input": "range", "min": 0, "max": 10000, "step": 100} },
    { "name": "x", "value": 100,
      "bind": {"input": "range", "min": 10, "max": 190, "step": 1} },
    { "name": "y", "value": 100,
      "bind": {"input": "range", "min": 10, "max": 190, "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"]} }
  ],

  "marks": [
    {
      "type": "symbol",
      "encode": {
        "enter": {
          "fill": {"value": "#939597"},
          "stroke": {"value": "#652c90"}
        },
        "update": {
          "x": {"signal": "x"},
          "y": {"signal": "y"},
          "angle": {"signal": "angle"},
          "size": {"signal": "size"},
          "shape": {"signal": "shape"},
          "opacity": {"value": 1},
          "strokeWidth": {"signal": "strokeWidth"},
          "fillOpacity": {"signal": "color === 'fill' || color === 'both' ? 1 : 0"},
          "strokeOpacity": {"signal": "color === 'stroke' || color === 'both' ? 1 : 0"}
        },
        "hover": {
          "opacity": {"value": 0.5}
        }
      }
    }
  ]
}
