Format: Ro: Diferență între versiuni

De la alegeri.md
Salt la: navigare, căutare
Linia 2.403: Linia 2.403:
 
}
 
}
 
</graph>
 
</graph>
 +
 +
 +
 +
<graph>
 +
{
 +
  "name": "Vega Visualization",
 +
  "height": 500,
 +
  "padding": "auto",
 +
  "marks": [
 +
    {
 +
      "marks": [
 +
        {
 +
          "properties": {
 +
            "enter": {
 +
              "interpolate": {
 +
                "value": "cardinal"
 +
              },
 +
              "x": {
 +
                "field": "x",
 +
                "scale": "x"
 +
              },
 +
              "y2": {
 +
                "field": "layout_end",
 +
                "scale": "y"
 +
              },
 +
              "fill": {
 +
                "field": "group",
 +
                "scale": "group"
 +
              },
 +
              "y": {
 +
                "field": "layout_start",
 +
                "scale": "y"
 +
              }
 +
            }
 +
          },
 +
          "type": "area"
 +
        }
 +
      ],
 +
      "from": {
 +
        "data": "table",
 +
        "transform": [
 +
          {
 +
            "field": "y",
 +
            "groupby": [
 +
              "x"
 +
            ],
 +
            "type": "stack",
 +
            "offset": "center"
 +
          },
 +
          {
 +
            "groupby": [
 +
              "group"
 +
            ],
 +
            "type": "facet"
 +
          }
 +
        ]
 +
      },
 +
      "type": "group"
 +
    }
 +
  ],
 +
  "axes": [
 +
    {
 +
      "type": "x",
 +
      "scale": "x"
 +
    },
 +
    {
 +
      "type": "y",
 +
      "scale": "y",
 +
      "tickSize": 0,
 +
      "properties": {
 +
      "labels": {
 +
        "fontSize": {"value": 0}
 +
      }
 +
    }
 +
    }
 +
  ],
 +
  "data": [
 +
    {
 +
      "name": "table",
 +
      "values": [
 +
        {
 +
          "x": "01/08/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.1
 +
        },
 +
        {
 +
          "x": "01/09/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.15
 +
        },
 +
        {
 +
          "x": "01/10/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/11/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.38
 +
        },
 +
        {
 +
          "x": "01/12/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/13/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/14/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.07
 +
        },
 +
        {
 +
          "x": "01/15/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.02
 +
        },
 +
        {
 +
          "x": "01/16/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.17
 +
        },
 +
        {
 +
          "x": "01/17/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.33
 +
        },
 +
        {
 +
          "x": "01/18/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/19/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/20/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/21/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/22/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/23/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/24/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/25/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/26/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/27/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/28/2013",
 +
          "y2": 0,
 +
          "group": "AR",
 +
          "y": 0.1
 +
        },
 +
        {
 +
          "x": "01/08/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/09/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.36
 +
        },
 +
        {
 +
          "x": "01/10/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.37
 +
        },
 +
        {
 +
          "x": "01/11/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/12/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.24
 +
        },
 +
        {
 +
          "x": "01/13/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/14/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.34
 +
        },
 +
        {
 +
          "x": "01/15/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.21
 +
        },
 +
        {
 +
          "x": "01/16/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.18
 +
        },
 +
        {
 +
          "x": "01/17/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.45
 +
        },
 +
        {
 +
          "x": "01/18/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/19/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/20/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.3
 +
        },
 +
        {
 +
          "x": "01/21/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.28
 +
        },
 +
        {
 +
          "x": "01/22/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.27
 +
        },
 +
        {
 +
          "x": "01/23/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/24/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.15
 +
        },
 +
        {
 +
          "x": "01/25/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.3
 +
        },
 +
        {
 +
          "x": "01/26/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/27/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.42
 +
        },
 +
        {
 +
          "x": "01/28/2013",
 +
          "y2": 0,
 +
          "group": "DJ",
 +
          "y": 0.42
 +
        },
 +
        {
 +
          "x": "01/08/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.21
 +
        },
 +
        {
 +
          "x": "01/09/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.25
 +
        },
 +
        {
 +
          "x": "01/10/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.27
 +
        },
 +
        {
 +
          "x": "01/11/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.23
 +
        },
 +
        {
 +
          "x": "01/12/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.24
 +
        },
 +
        {
 +
          "x": "01/13/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.21
 +
        },
 +
        {
 +
          "x": "01/14/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/15/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.39
 +
        },
 +
        {
 +
          "x": "01/16/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/17/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.36
 +
        },
 +
        {
 +
          "x": "01/18/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.33
 +
        },
 +
        {
 +
          "x": "01/19/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.43
 +
        },
 +
        {
 +
          "x": "01/20/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/21/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.34
 +
        },
 +
        {
 +
          "x": "01/22/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.28
 +
        },
 +
        {
 +
          "x": "01/23/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/24/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.37
 +
        },
 +
        {
 +
          "x": "01/25/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.41
 +
        },
 +
        {
 +
          "x": "01/26/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.46
 +
        },
 +
        {
 +
          "x": "01/27/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.47
 +
        },
 +
        {
 +
          "x": "01/28/2013",
 +
          "y2": 0,
 +
          "group": "MS",
 +
          "y": 0.41
 +
        },
 +
        {
 +
          "x": "01/08/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.1
 +
        },
 +
        {
 +
          "x": "01/09/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.15
 +
        },
 +
        {
 +
          "x": "01/10/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/11/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.38
 +
        },
 +
        {
 +
          "x": "01/12/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/13/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/14/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.07
 +
        },
 +
        {
 +
          "x": "01/15/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.02
 +
        },
 +
        {
 +
          "x": "01/16/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.17
 +
        },
 +
        {
 +
          "x": "01/17/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.33
 +
        },
 +
        {
 +
          "x": "01/18/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/19/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/20/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/21/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/22/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/23/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/24/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/25/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/26/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/27/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/28/2013",
 +
          "y2": 0,
 +
          "group": "RC",
 +
          "y": 0.1
 +
        },
 +
        {
 +
          "x": "01/08/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.1
 +
        },
 +
        {
 +
          "x": "01/09/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.15
 +
        },
 +
        {
 +
          "x": "01/10/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/11/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.38
 +
        },
 +
        {
 +
          "x": "01/12/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/13/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/14/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.07
 +
        },
 +
        {
 +
          "x": "01/15/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.02
 +
        },
 +
        {
 +
          "x": "01/16/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.17
 +
        },
 +
        {
 +
          "x": "01/17/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.33
 +
        },
 +
        {
 +
          "x": "01/18/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/19/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/20/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/21/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/22/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/23/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/24/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/25/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/26/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/27/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/28/2013",
 +
          "y2": 0,
 +
          "group": "CG",
 +
          "y": 0.1
 +
        },
 +
        {
 +
          "x": "01/08/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.1
 +
        },
 +
        {
 +
          "x": "01/09/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.15
 +
        },
 +
        {
 +
          "x": "01/10/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/11/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.38
 +
        },
 +
        {
 +
          "x": "01/12/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/13/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/14/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.07
 +
        },
 +
        {
 +
          "x": "01/15/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.02
 +
        },
 +
        {
 +
          "x": "01/16/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.17
 +
        },
 +
        {
 +
          "x": "01/17/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.33
 +
        },
 +
        {
 +
          "x": "01/18/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/19/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/20/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/21/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.35
 +
        },
 +
        {
 +
          "x": "01/22/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.4
 +
        },
 +
        {
 +
          "x": "01/23/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.32
 +
        },
 +
        {
 +
          "x": "01/24/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.26
 +
        },
 +
        {
 +
          "x": "01/25/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/26/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.16
 +
        },
 +
        {
 +
          "x": "01/27/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.22
 +
        },
 +
        {
 +
          "x": "01/28/2013",
 +
          "y2": 0,
 +
          "group": "RI",
 +
          "y": 0.1
 +
        }
 +
      ]
 +
    },
 +
    {
 +
      "name": "stats",
 +
      "source": "table",
 +
      "transform": [
 +
        {
 +
          "groupby": [
 +
            "x"
 +
          ],
 +
          "type": "aggregate",
 +
          "summarize": [
 +
            {
 +
              "ops": [
 +
                "sum"
 +
              ],
 +
              "field": "y"
 +
            }
 +
          ]
 +
        }
 +
      ]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {
 +
      "name": "x",
 +
      "points": true,
 +
      "range": "width",
 +
      "domain": {
 +
        "data": "table",
 +
        "field": "x"
 +
      },
 +
      "type": "ordinal"
 +
    },
 +
    {
 +
      "name": "y",
 +
      "range": "height",
 +
      "domain": {
 +
        "data": "stats",
 +
        "field": "sum_y"
 +
      },
 +
      "type": "linear"
 +
    },
 +
    {
 +
      "name": "group",
 +
      "range":["#B30000", "#E34A33", "#FC8D59", "#FDBB84", "#FDD49E", "#FEF0D9"],
 +
      "domain": {
 +
        "data": "table",
 +
        "field": "group"
 +
      },
 +
      "type": "ordinal"
 +
    }
 +
  ],
 +
  "width": 1200,
 +
  "legends": [
 +
    {
 +
      "title": "Group",
 +
      "fill": "group"
 +
    }
 +
  ]
 +
}</graph>
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
<graph>
 +
{
 +
  "name": "Vega Visualization",
 +
  "height": 450,
 +
  "padding": "auto",
 +
  "marks": [
 +
    {
 +
      "properties": {
 +
        "enter": {
 +
          "x": {
 +
            "field": "x",
 +
            "scale": "x",
 +
            "offset": -10
 +
          },
 +
          "fillOpacity": {
 +
            "value": 0.9
 +
          },
 +
          "fill": {
 +
            "field": "group",
 +
            "scale": "group"
 +
          },
 +
          "y": {
 +
            "field": "y",
 +
            "scale": "y",
 +
            "offset": 4
 +
          },
 +
          "text": {"field": "group"},
 +
          "fontSize": {"value": 11}
 +
        }
 +
      },
 +
      "from": {
 +
        "data": "table"
 +
      },
 +
      "type": "text"
 +
    }
 +
  ],
 +
  "axes": [
 +
    {
 +
      "titleOffset": 40,
 +
      "layer": "front",
 +
      "properties": {
 +
        "title": {
 +
          "fontSize": {
 +
            "value": 14
 +
          }
 +
        }
 +
      },
 +
      "grid": false,
 +
      "type": "y",
 +
      "scale": "y",
 +
      "ticks": 15,
 +
      "tickSize": 0,
 +
      "tickPadding": 10
 +
    }
 +
  ],
 +
  "data": [
 +
    {
 +
      "name": "table",
 +
      "values": [
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 0
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 0
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 0
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 0
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 1
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 3
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 4
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 5
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 6
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 6
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 6
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 6
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 7
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 11,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 12,
 +
          "y2": 0,
 +
          "group": 8,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 13,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 8
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 8,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 11,
 +
          "y2": 0,
 +
          "group": 8,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 12,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 13,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 14,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 15,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 16,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 9
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 11,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 12,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 13,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 14,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 15,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 16,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 17,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 18,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 19,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 20,
 +
          "y2": 0,
 +
          "group": 8,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 21,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 22,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 10
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 11,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 12,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 13,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 14,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 15,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 11
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 11,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 12,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 13,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 14,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 15,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 16,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 17,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 18,
 +
          "y2": 0,
 +
          "group": 8,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 19,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 12
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 1,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 11,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 12,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 13,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 14,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 15,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 16,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 17,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 18,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 19,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 20,
 +
          "y2": 0,
 +
          "group": 6,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 21,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 22,
 +
          "y2": 0,
 +
          "group": 8,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 23,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 13
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 0,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 3,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 5,
 +
          "y2": 0,
 +
          "group": 4,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 6,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 7,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 8,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 9,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 10,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 11,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 12,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 14
 +
        },
 +
        {
 +
          "x": 1,
 +
          "y2": 0,
 +
          "group": 2,
 +
          "y": 15
 +
        },
 +
        {
 +
          "x": 2,
 +
          "y2": 0,
 +
          "group": 5,
 +
          "y": 15
 +
        },
 +
        {
 +
          "x": 3,
 +
          "y2": 0,
 +
          "group": 7,
 +
          "y": 15
 +
        },
 +
        {
 +
          "x": 4,
 +
          "y2": 0,
 +
          "group": 9,
 +
          "y": 15
 +
        }
 +
      ]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {
 +
      "name": "x",
 +
      "range": "width",
 +
      "domain": {
 +
        "data": "table",
 +
        "field": "x"
 +
      },
 +
      "type": "linear"
 +
    },
 +
    {
 +
      "reverse": true,
 +
      "name": "y",
 +
      "zero": true,
 +
      "domainMax": 15,
 +
      "domain": {
 +
        "data": "table",
 +
        "field": "y"
 +
      },
 +
      "domainMin": 0,
 +
      "range": "height",
 +
      "type": "linear",
 +
      "round": false
 +
    },
 +
    {
 +
      "name": "group",
 +
      "range": [
 +
        "black"
 +
      ],
 +
      "domain": {
 +
        "data": "table",
 +
        "field": "group"
 +
      },
 +
      "type": "ordinal"
 +
    }
 +
  ],
 +
  "width": 500
 +
}</graph>
 +
 +
 +
 +
 +
 +
<graph>
 +
{
 +
  "width": 400,
 +
  "height": 400,
 +
  "data": [
 +
    {
 +
      "name": "table",
 +
      "values": [12, 23, 47, 6, 52, 19],
 +
      "transform": [{"type": "pie", "field": "data"}]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {
 +
      "name": "r",
 +
      "type": "sqrt",
 +
      "domain": {"data": "table", "field": "data"},
 +
      "range": [20, 100]
 +
    }
 +
  ],
 +
  "marks": [
 +
    {
 +
      "type": "arc",
 +
      "from": {"data": "table"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"field": {"group": "width"}, "mult": 0.5},
 +
          "y": {"field": {"group": "height"}, "mult": 0.5},
 +
          "startAngle": {"field": "layout_start"},
 +
          "endAngle": {"field": "layout_end"},
 +
          "innerRadius": {"value": 20},
 +
          "outerRadius": {"scale": "r", "field": "data"},
 +
          "stroke": {"value": "#fff"}
 +
        },
 +
        "update": {
 +
          "fill": {"value": "#ccc"}
 +
        },
 +
        "hover": {
 +
          "fill": {"value": "pink"}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "text",
 +
      "from": {"data": "table"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"field": {"group": "width"}, "mult": 0.5},
 +
          "y": {"field": {"group": "height"}, "mult": 0.5},
 +
          "radius": {"scale": "r", "field": "data", "offset": 8},
 +
          "theta": {"field": "layout_mid"},
 +
          "fill": {"value": "#000"},
 +
          "align": {"value": "center"},
 +
          "baseline": {"value": "middle"},
 +
          "text": {"field": "data"}
 +
        }
 +
      }
 +
    }
 +
  ]
 +
}
 +
</graph>
 +
 +
 +
<graph>{
 +
  "width": 500,
 +
  "height": 50,
 +
 +
  "signals": [
 +
    { "name": "layers", "init": 2,
 +
      "streams": [
 +
        {"type": "click", "expr": "1 + (layers % 4)"}
 +
      ]
 +
    },
 +
    { "name": "vheight", "init": {"expr": "height * layers"},
 +
      "streams": [
 +
        {"type": "layers, height", "expr": "height * layers"}
 +
      ]
 +
    },
 +
    { "name": "opacity", "init": {"expr": "pow(layers, -2/3)"},
 +
      "streams": [
 +
        {"type": "layers", "expr": "pow(layers, -2/3)"}
 +
      ]
 +
    }
 +
  ],
 +
 +
  "data": [
 +
    {
 +
      "name": "layer_indices",
 +
      "values": [0, 1, 2, 3],
 +
      "transform": [
 +
        {"type": "filter", "test": "datum.data < layers"},
 +
        {"type": "formula", "field": "offset", "expr": "datum.data * -height"}
 +
      ]
 +
    },
 +
    {
 +
      "name": "table",
 +
      "values": [
 +
        {"x": 1,  "y": 28}, {"x": 2,  "y": 55},
 +
        {"x": 3,  "y": 43}, {"x": 4,  "y": 91},
 +
        {"x": 5,  "y": 81}, {"x": 6,  "y": 53},
 +
        {"x": 7,  "y": 19}, {"x": 8,  "y": 87},
 +
        {"x": 9,  "y": 52}, {"x": 10, "y": 48},
 +
        {"x": 11, "y": 24}, {"x": 12, "y": 49},
 +
        {"x": 13, "y": 87}, {"x": 14, "y": 66},
 +
        {"x": 15, "y": 17}, {"x": 16, "y": 27},
 +
        {"x": 17, "y": 68}, {"x": 18, "y": 16},
 +
        {"x": 19, "y": 49}, {"x": 20, "y": 15}
 +
      ]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {
 +
      "name": "x",
 +
      "type": "linear",
 +
      "range": "width",
 +
      "zero": false, "round": true,
 +
      "domain": {"data": "table", "field": "x"}
 +
    },
 +
    {
 +
      "name": "y",
 +
      "type": "linear",
 +
      "range": [{"signal":"vheight"}, 0],
 +
      "nice": true,
 +
      "domain": {"data": "table", "field": "y"}
 +
    }
 +
  ],
 +
  "axes": [
 +
    {"type": "x", "scale": "x", "ticks": 20}
 +
  ],
 +
  "marks": [
 +
    {
 +
      "type": "group",
 +
      "properties": {
 +
        "update": {
 +
          "width": {"field": {"group": "width"}},
 +
          "height": {"field": {"group": "height"}},
 +
          "clip": {"value": true}
 +
        }
 +
      },
 +
      "marks": [
 +
        {
 +
          "type": "group",
 +
          "from": {"data": "layer_indices"},
 +
          "properties": {
 +
            "update": {
 +
              "y": {"field": "offset"}
 +
            }
 +
          },
 +
          "marks": [
 +
            {
 +
              "type": "area",
 +
              "from": {"data": "table"},
 +
              "properties": {
 +
                "enter": {
 +
                  "interpolate": {"value": "monotone"},
 +
                  "x": {"scale": "x", "field": "x"},
 +
                  "fill": {"value": "steelblue"}
 +
                },
 +
                "update": {
 +
                  "y": {"scale": "y", "field": "y"},
 +
                  "y2": {"scale": "y", "value": 0},
 +
                  "fillOpacity": {"signal": "opacity"}
 +
                }
 +
              }
 +
            }
 +
          ]
 +
        }
 +
      ]
 +
    }
 +
  ]
 +
}</graph>
 +
 +
 +
<graph>
 +
{
 +
  "width": 400,
 +
  "height": 100,
 +
  "padding": {"top": 30, "left": 30, "bottom": 30, "right": 10},
 +
  "data": [
 +
    {
 +
      "name": "aggregate",
 +
      "values": [
 +
        {"label": "Category A", "mean": 1, "lo": 0,  "hi": 2},
 +
        {"label": "Category B", "mean": 2, "lo": 1.5, "hi": 2.5},
 +
        {"label": "Category C", "mean": 3, "lo": 1.7, "hi": 4.3},
 +
        {"label": "Category D", "mean": 4, "lo": 3,  "hi": 5},
 +
        {"label": "Category E", "mean": 5, "lo": 4.1, "hi": 5.9}
 +
      ]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {
 +
      "name": "y",
 +
      "type": "ordinal",
 +
      "range": "height",
 +
      "domain": {"data": "aggregate", "field": "label"}
 +
    },
 +
    {
 +
      "name": "x",
 +
      "type": "linear",
 +
      "domain": {"data": "aggregate", "field": "hi"},
 +
      "range": [100, 400],
 +
      "nice": true,
 +
      "zero": true
 +
    }
 +
  ],
 +
  "axes": [
 +
    {"type": "x", "scale": "x", "ticks": 6}
 +
  ],
 +
  "marks": [
 +
    {
 +
      "type": "text",
 +
      "from": {"data": "aggregate"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"value": 0},
 +
          "y": {"scale": "y", "field": "label"},
 +
          "baseline": {"value": "middle"},
 +
          "fill": {"value": "#000"},
 +
          "text": {"field": "label"},
 +
          "font": {"value": "Helvetica Neue"},
 +
          "fontSize": {"value": 13}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "rect",
 +
      "from": {"data": "aggregate"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"scale": "x", "field": "lo"},
 +
          "x2": {"scale": "x", "field": "hi"},
 +
          "y": {"scale": "y", "field": "label", "offset": -1},
 +
          "height": {"value": 1},
 +
          "fill": {"value": "#888"}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "symbol",
 +
      "from": {"data": "aggregate"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"scale": "x", "field": "mean"},
 +
          "y": {"scale": "y", "field": "label"},
 +
          "size": {"value": 40},
 +
          "fill": {"value": "#000"}
 +
        }
 +
      }
 +
    }
 +
  ]
 +
}</graph>
 +
 +
 +
<graph>
 +
{
 +
  "width": 500,
 +
  "height": 250,
 +
  "padding": "auto",
 +
  "data": [
 +
    {
 +
      "name": "table",
 +
      "values": [
 +
        {"year": 1875,"population": 1309},
 +
        {"year": 1890,"population": 1558},
 +
        {"year": 1910,"population": 4512},
 +
        {"year": 1925,"population": 8180},
 +
        {"year": 1933,"population": 15915},
 +
        {"year": 1939,"population": 24824},
 +
        {"year": 1946,"population": 28275},
 +
        {"year": 1950,"population": 29189},
 +
        {"year": 1964,"population": 29881},
 +
        {"year": 1971,"population": 26007},
 +
        {"year": 1981,"population": 24029},
 +
        {"year": 1985,"population": 23340},
 +
        {"year": 1989,"population": 22307},
 +
        {"year": 1990,"population": 22087},
 +
        {"year": 1991,"population": 22139},
 +
        {"year": 1992,"population": 22105},
 +
        {"year": 1993,"population": 22242},
 +
        {"year": 1994,"population": 22801},
 +
        {"year": 1995,"population": 24273},
 +
        {"year": 1996,"population": 25640},
 +
        {"year": 1997,"population": 27393},
 +
        {"year": 1998,"population": 29505},
 +
        {"year": 1999,"population": 32124},
 +
        {"year": 2000,"population": 33791},
 +
        {"year": 2001,"population": 35297},
 +
        {"year": 2002,"population": 36179},
 +
        {"year": 2003,"population": 36829},
 +
        {"year": 2004,"population": 37493},
 +
        {"year": 2005,"population": 38376},
 +
        {"year": 2006,"population": 39008},
 +
        {"year": 2007,"population": 39366},
 +
        {"year": 2008,"population": 39821},
 +
        {"year": 2009,"population": 40179},
 +
        {"year": 2010,"population": 40511},
 +
        {"year": 2011,"population": 40465},
 +
        {"year": 2012,"population": 40905},
 +
        {"year": 2013,"population": 41258},
 +
        {"year": 2014,"population": 41777}
 +
      ]
 +
    },
 +
    {
 +
      "name": "annotation",
 +
      "values": [
 +
        {"start": 1933,"end": 1945,"text": "Nazi rule"},
 +
        {
 +
          "start": 1948,
 +
          "end": 1989,
 +
          "text": "GDR (East Germany)"
 +
        }
 +
      ]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {
 +
      "name": "x",
 +
      "type": "linear",
 +
      "range": "width",
 +
      "zero": false,
 +
      "domain": {"data": "table","field": "year"}
 +
    },
 +
    {
 +
      "name": "y",
 +
      "type": "linear",
 +
      "range": "height",
 +
      "nice": true,
 +
      "domain": {"data": "table","field": "population"}
 +
    },
 +
    {
 +
      "name": "color",
 +
      "type": "ordinal",
 +
      "domain": {"data": "annotation","field": "text"},
 +
      "range": ["black","red"]
 +
    }
 +
  ],
 +
  "axes": [
 +
    {
 +
      "type": "x",
 +
      "scale": "x",
 +
      "format": "d",
 +
      "title": "Year",
 +
      "ticks": 15
 +
    },
 +
    {
 +
      "type": "y",
 +
      "scale": "y",
 +
      "title": "Population",
 +
      "grid": true,
 +
      "layer": "back"
 +
    }
 +
  ],
 +
  "marks": [
 +
    {
 +
      "type": "rect",
 +
      "from": {"data": "annotation"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"scale": "x","field": "start"},
 +
          "x2": {"scale": "x","field": "end"},
 +
          "y": {"value": 0},
 +
          "y2": {"signal": "height"},
 +
          "fill": {"scale": "color","field": "text"},
 +
          "opacity": {"value": 0.2}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "line",
 +
      "from": {"data": "table"},
 +
      "properties": {
 +
        "enter": {
 +
          "interpolate": {"value": "monotone"},
 +
          "x": {"scale": "x","field": "year"},
 +
          "y": {"scale": "y","field": "population"},
 +
          "stroke": {"value": "steelblue"},
 +
          "strokeWidth": {"value": 3}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "symbol",
 +
      "from": {"data": "table"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"scale": "x","field": "year"},
 +
          "y": {"scale": "y","field": "population"},
 +
          "stroke": {"value": "steelblue"},
 +
          "fill": {"value": "white"},
 +
          "size": {"value": 30}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "text",
 +
      "from": {
 +
        "data": "table",
 +
        "transform": [
 +
          {
 +
            "type": "aggregate",
 +
            "summarize": {"year": ["min","max"]}
 +
          }
 +
        ]
 +
      },
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"signal": "width","mult": 0.5},
 +
          "y": {"value": -10},
 +
          "text": {
 +
            "template": "Population of Falkensee from {{datum.min_year}} to {{datum.max_year}}"
 +
          },
 +
          "fill": {"value": "black"},
 +
          "fontSize": {"value": 16},
 +
          "align": {"value": "center"},
 +
          "fontWeight": {"value": "bold"}
 +
        }
 +
      }
 +
    }
 +
  ],
 +
  "legends": [
 +
    {
 +
      "fill": "color",
 +
      "title": "Period",
 +
      "properties": {
 +
        "symbols": {
 +
          "strokeWidth": {"value": 0},
 +
          "shape": {"value": "square"},
 +
          "opacity": {"value": 0.3}
 +
        },
 +
        "legend": {
 +
          "x": {"value": 10},
 +
          "y": {"value": 5},
 +
          "fill": {"value": "white"}
 +
        }
 +
      }
 +
    }
 +
  ]
 +
}</graph>
 +
 +
 +
<graph>
 +
{
 +
  "width": 300,
 +
  "height": 240,
 +
  "data": [
 +
    {
 +
      "name": "table",
 +
      "values": [
 +
        {"category":"A", "position":0, "value":0.1},
 +
        {"category":"A", "position":1, "value":0.6},
 +
        {"category":"A", "position":2, "value":0.9},
 +
        {"category":"A", "position":3, "value":0.4},
 +
        {"category":"B", "position":0, "value":0.7},
 +
        {"category":"B", "position":1, "value":0.2},
 +
        {"category":"B", "position":2, "value":1.1},
 +
        {"category":"B", "position":3, "value":0.8},
 +
        {"category":"C", "position":0, "value":0.6},
 +
        {"category":"C", "position":1, "value":0.1},
 +
        {"category":"C", "position":2, "value":0.2},
 +
        {"category":"C", "position":3, "value":0.7}
 +
      ]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {
 +
      "name": "cat",
 +
      "type": "ordinal",
 +
      "domain": {"data": "table", "field": "category"},
 +
      "range": "height",
 +
      "padding": 0.2
 +
    },
 +
    {
 +
      "name": "val",
 +
      "type": "linear",
 +
      "domain": {"data": "table", "field": "value"},
 +
      "range": "width",
 +
      "round": true,
 +
      "nice": true
 +
    },
 +
    {
 +
      "name": "color",
 +
      "type": "ordinal",
 +
      "domain": {"data": "table", "field": "position"},
 +
      "range": "category10"
 +
    }
 +
  ],
 +
  "axes": [
 +
    {"type": "y", "scale": "cat", "tickSize": 0, "tickPadding": 8},
 +
    {"type": "x", "scale": "val"}
 +
  ],
 +
  "marks": [
 +
    {
 +
      "type": "group",
 +
      "from": {
 +
        "data": "table",
 +
        "transform": [{"type":"facet", "groupby": ["category"]}]
 +
      },
 +
      "properties": {
 +
        "enter": {
 +
          "y": {"scale": "cat", "field": "key"},
 +
          "height": {"scale": "cat", "band": true}
 +
        }
 +
      },
 +
      "scales": [
 +
        {
 +
          "name": "pos",
 +
          "type": "ordinal",
 +
          "range": "height",
 +
          "domain": {"field": "position"}
 +
        }
 +
      ],
 +
      "marks": [
 +
        {
 +
          "name": "bars",
 +
          "type": "rect",
 +
          "properties": {
 +
            "enter": {
 +
              "y": {"scale": "pos", "field": "position"},
 +
              "height": {"scale": "pos", "band": true},
 +
              "x": {"scale": "val", "field": "value"},
 +
              "x2": {"scale": "val", "value": 0},
 +
              "fill": {"scale": "color", "field": "position"}
 +
            }
 +
          }
 +
        },
 +
        {
 +
          "type": "text",
 +
          "from": {"mark": "bars"},
 +
          "properties": {
 +
            "enter": {
 +
              "x": {"field": "x2", "offset": -5},
 +
              "y": {"field": "y"},
 +
              "dy": {"field": "height", "mult": 0.5},
 +
              "fill": {"value": "white"},
 +
              "align": {"value": "right"},
 +
              "baseline": {"value": "middle"},
 +
              "text": {"field": "datum.value"}
 +
            }
 +
          }
 +
        }
 +
      ]
 +
    }
 +
  ]
 +
}</graph>

Versiunea de la data 3 august 2020 21:06
















18293 / 201818793 / 2018147 / 2019