Format: Ro: Diferență între versiuni

De la alegeri.md
Salt la: navigare, căutare
 
(Nu s-au afișat 3 versiuni intermediare efectuate de același utilizator)
Linia 97: Linia 97:
 
-->
 
-->
  
<graph>
+
===-1===
{
+
 
  "version": 2,
+
<graph>{
  "width": 500,
+
  "width": 400,
  "height": 250,
+
  "height": 120,
  "padding": "auto",
+
  "data": [
  "data": [
+
    {
    {
+
      "name": "table",
      "name": "table",
+
"values": [
      "values": [
+
{"year":2008, "daily":26.541},
        {"year": 2005,"population": 6, "photo" : 6 },
+
{"year":2009, "daily":24.748},
        {"year": 2006,"population": 15, "photo" : 17},
+
{"year":2010, "daily":24.803},
        {"year": 2007,"population": 16, "photo" : 21},
+
{"year":2011, "daily":25.483},
        {"year": 2008,"population": 22, "photo" : 28},
+
{"year":2012, "daily":24.729},
        {"year": 2009,"population": 19, "photo" : 25},
+
{"year":2013, "daily":24.413},
        {"year": 2010,"population": 25, "photo" : 50},
+
{"year":2014, "daily":24.879},
        {"year": 2011,"population": 18, "photo" : 33},
+
]
        {"year": 2012,"population": 22, "photo" : 67},
+
    }
        {"year": 2013,"population": 34, "photo" : 174},
+
  ],
        {"year": 2014,"population": 17, "photo" : 183},
+
  "signals": [
        {"year": 2015,"population": 22, "photo" : 206},
+
    {
        {"year": 2016,"population": 30, "photo" : 338},
+
      "name": "tooltip",
        {"year": 2017,"population": 31, "photo" : 1102},
+
      "init": {},
        {"year": 2018,"population": 48, "photo" : 2008},       
+
      "streams": [
        {"year": 2019,"population": 48, "photo" : 2008},                               
+
        {"type": "symbol:mouseover", "expr": "datum"},
      ]
+
        {"type": "symbol:mouseout", "expr": "{}"}
 +
      ]
 +
    }
 +
  ],
 +
  "predicates": [
 +
    {
 +
      "name": "tooltip", "type": "==",
 +
      "operands": [{"signal": "tooltip._id"}, {"arg": "id"}]
 +
    }
 +
  ],
 +
  "scales": [
 +
    {"name": "time", "type": "linear", "nice": true, "zero": false, "round": true,
 +
    "range": "width", "domain": {"data":"table", "field":"year"}},
 +
    {"name": "traffic", "nice": true, "zero": false, "round": true,
 +
    "range": "height", "domain": {"data":"table", "field":"daily"}},
 +
    {
 +
      "name": "align",
 +
      "type": "ordinal",
 +
      "domain": ["left", "right", "top", "bottom"],
 +
      "range": ["right", "left", "center", "center"]
 +
    },
 +
    {
 +
      "name": "base",
 +
      "type": "ordinal",
 +
      "domain": ["left", "right", "top", "bottom"],
 +
      "range": ["middle", "middle", "bottom", "top"]
 +
    },
 +
    {
 +
      "name": "dx",
 +
      "type": "ordinal",
 +
      "domain": ["left", "right", "top", "bottom"],
 +
      "range": [-7, 6, 0, 50]
 +
    },
 +
    {
 +
      "name": "dy",
 +
      "type": "ordinal",
 +
      "domain": ["left", "right", "top", "bottom"],
 +
      "range": [1, 1, -5, 6]
 +
    }
 +
  ],
 +
  "axes": [
 +
    {"type": "x", "scale": "time", "title": "Year", "titleOffset": 35, "format": "4d", "ticks": 7},
 +
    {"type": "y", "scale": "traffic", "title": "Daily (10k)", "titleOffset": 40, "grid": true, "ticks": 7}
 +
  ],
 +
  "marks": [
 +
    {
 +
      "type": "line",
 +
      "from": {"data": "table"},
 +
      "properties": {
 +
        "enter": {
 +
          "interpolate": {"value": "monotone"},
 +
          "x": {"scale": "time", "field": "year"},
 +
          "y": {"scale": "traffic", "field": "daily"},
 +
          "stroke": {"value": "#000"},
 +
          "strokeWidth": {"value": 3}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "symbol",
 +
      "from": {"data": "table"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"scale": "time", "field": "year"},
 +
          "y": {"scale": "traffic", "field": "daily"},
 +
          "fill": {"value": "#fff"},
 +
          "stroke": {"value": "#000"},
 +
          "strokeWidth": {"value": 1},
 +
          "size": {"value": 49}
 +
        }
 +
      }
 +
    },
 +
    {
 +
      "type": "text",
 +
      "properties": {
 +
        "enter": {
 +
          "align": {"value": "center"},
 +
          "fill": {"value": "#333"}
 +
        },
 +
        "update": {
 +
          "x": {"scale": "time", "signal": "tooltip.year"},
 +
          "dx": {"scale": "dx", "field": "right"},
 +
          "y": {"scale": "traffic", "signal": "tooltip.daily", "offset": -12},
 +
          "dy": {"scale": "dy", "field": "right"},
 +
          "text": {"signal": "tooltip.daily"},
 +
          "fillOpacity": {
 +
            "rule": [
 +
              {
 +
                "predicate": {
 +
                  "name": "tooltip",
 +
                  "id": {"value": null}
 +
                },
 +
                "value": 0
 +
              },
 +
              {"value": 1}
 +
            ]
 +
          }
 +
        }
 +
      }
 +
    }
 +
  ]
 +
}</graph>
 +
 
 +
===0===
 +
 
 +
<graph>
 +
{
 +
  "scales": [
 +
    {
 +
      "padding": 0.2,
 +
      "range": "height",
 +
      "type": "ordinal",
 +
      "domain": {
 +
        "field": "category",
 +
        "data": "table"
 +
      },
 +
      "name": "cat"
 +
    },
 +
    {
 +
      "domain": {
 +
        "field": "value",
 +
        "data": "table"
 +
      },
 +
      "name": "val",
 +
      "range": "width",
 +
      "type": "linear",
 +
      "round": "true",
 +
      "nice": "true"
 +
    },
 +
    {
 +
      "range": "category20",
 +
      "type": "ordinal",
 +
      "domain": {
 +
        "field": "position",
 +
        "data": "table"
 +
      },
 +
      "name": "color"
 +
    }
 +
  ],
 +
  "axes": [
 +
    {
 +
      "tickSize": 0,
 +
      "scale": "cat",
 +
      "type": "y",
 +
      "tickPadding": 8
 +
    },
 +
    {
 +
      "scale": "val",
 +
      "type": "x"
 +
    }
 +
  ],
 +
  "signals": [
 +
    {
 +
      "name": "tooltip",
 +
      "init": {},
 +
      "streams": [
 +
        {"type": "rect:mouseover", "expr": "datum"},
 +
        {"type": "rect:mouseout", "expr": "{}"}
 +
      ]
 +
    }
 +
  ],
 +
  "predicates": [
 +
    {
 +
      "name": "tooltip", "type": "==",
 +
      "operands": [{"signal": "tooltip._id"}, {"arg": "id"}]
 +
    }
 +
  ], 
 +
  "height": 800,
 +
  "width": 600,
 +
  "marks": [
 +
    {
 +
      "from": {
 +
        "data": "table",
 +
        "transform": [
 +
          {
 +
            "type": "facet",
 +
            "groupby": [
 +
              "category"
 +
            ]
 +
          }
 +
        ]
 +
      },
 +
      "marks": [
 +
        {
 +
          "type": "rect",
 +
          "name": "bars",
 +
          "properties": {
 +
            "enter": {
 +
              "y": {
 +
                "field": "position",
 +
                "scale": "pos"
 +
              },
 +
              "x": {
 +
                "field": "value",
 +
                "scale": "val"
 +
              },
 +
              "x2": {
 +
                "scale": "val",
 +
                "value": 0
 +
              },
 +
              "fill": {
 +
                "field": "position",
 +
                "scale": "color"
 +
              },
 +
              "height": {
 +
                "band": "true",
 +
                "scale": "pos"
 +
              }
 +
            }
 +
          }
 +
        },
 +
        {
 +
          "from": {
 +
            "mark": "bars"
 +
          },
 +
          "type": "text",
 +
          "properties": {
 +
            "enter": {
 +
              "align": {"value": "center"},
 +
              "fill": {"value": "#333"}
 +
            },
 +
            "update": {
 +
              "x": { "field": "x2"},
 +
              "dy": {"field":"height", "mult": 0.5},
 +
              "y": {"field":"y"},
 +
              "text": {"field": "datum.label"},
 +
              "align": {"value":"center"},
 +
              "baseline":{"value":"middle"},
 +
              "fillOpacity": {
 +
                "rule": [
 +
                  {
 +
                    "predicate": {"name": "tooltip", "id": {"value": null}},
 +
                    "value": 0
 +
                  },
 +
                  {"value": 1}
 +
                ]
 +
              }
 +
            }
 +
          }
 +
        }
 +
      ],
 +
      "type": "group",
 +
      "properties": {
 +
        "enter": {
 +
          "y": {
 +
            "field": "key",
 +
            "scale": "cat"
 +
          },
 +
          "height": {
 +
            "band": "true",
 +
            "scale": "cat"
 +
          }
 +
        }
 +
      },
 +
      "scales": [
 +
        {
 +
          "range": "height",
 +
          "type": "ordinal",
 +
          "name": "pos",
 +
          "domain": {
 +
            "field": "position"
 +
          }
 +
        }
 +
      ]
 +
    }
 +
  ],
 +
  "data": [
 +
    {
 +
      "values": [
 +
        {
 +
          "category": "A",
 +
          "position": 1,
 +
          "value": 1661.0,
 +
          "label": 40.0
 +
        },
 +
        {
 +
          "category": "A",
 +
          "position": 2,
 +
          "value": 2928.0,
 +
          "label": 35.0
 +
        },
 +
        {
 +
          "category": "A",
 +
          "position": 3,
 +
          "value": 9010.0,
 +
          "label": 69.0
 +
        },
 +
        {
 +
          "category": "A",
 +
          "position": 4,
 +
          "value": 6459.0,
 +
          "label": 97.0
 +
        },
 +
        {
 +
          "category": "B",
 +
          "position": 1,
 +
          "value": 1022.0,
 +
          "label": 39.0
 +
        },
 +
        {
 +
          "category": "B",
 +
          "position": 2,
 +
          "value": 1185.0,
 +
          "label": 33.0
 +
        },
 +
        {
 +
          "category": "B",
 +
          "position": 3,
 +
          "value": 567.0,
 +
          "label": 60.0
 +
        },
 +
        {
 +
          "category": "B",
 +
          "position": 4,
 +
          "value": 759.0,
 +
          "label": 84.0
 +
        }
 +
      ],
 +
      "name": "table"
 +
    }
 +
  ]
 +
}
 +
</graph>
 +
 
 +
===1===
 +
 
 +
<graph>
 +
{
 +
  "version": 2,
 +
  "width": 500,
 +
  "height": 250,
 +
  "padding": "auto",
 +
  "data": [
 +
    {
 +
      "name": "table",
 +
      "values": [
 +
        {"year": 2005,"population": 6, "photo" : 6 },
 +
        {"year": 2006,"population": 15, "photo" : 17},
 +
        {"year": 2007,"population": 16, "photo" : 21},
 +
        {"year": 2008,"population": 22, "photo" : 28},
 +
        {"year": 2009,"population": 19, "photo" : 25},
 +
        {"year": 2010,"population": 25, "photo" : 50},
 +
        {"year": 2011,"population": 18, "photo" : 33},
 +
        {"year": 2012,"population": 22, "photo" : 67},
 +
        {"year": 2013,"population": 34, "photo" : 174},
 +
        {"year": 2014,"population": 17, "photo" : 183},
 +
        {"year": 2015,"population": 22, "photo" : 206},
 +
        {"year": 2016,"population": 30, "photo" : 338},
 +
        {"year": 2017,"population": 31, "photo" : 1102},
 +
        {"year": 2018,"population": 48, "photo" : 2008},       
 +
        {"year": 2019,"population": 48, "photo" : 2008},                               
 +
      ]
 
    },
 
    },
 
    {
 
    {
Linia 359: Linia 710:
 
-->
 
-->
  
 +
===2===
  
 +
<graph>{"version":2,"width":741,"height":269,"data":[{"name":"table","values":[{"x":0,"y":1},{"x":1,"y":3},{"x":2,"y":2},{"x":3,"y":4},{"x":4,"y":5}]}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"table","field":"x"}},{"name":"y","type":"linear","range":"height","nice":true,"domain":{"data":"table","field":"y"}}],"axes":[{"type":"x","scale":"x"},{"type":"y","scale":"y"}],"marks":[{"type":"line","from":{"data":"table"},"properties":{"enter":{"x":{"scale":"x","field":"x"},"y":{"scale":"y","field":"y"},"y2":{"scale":"y","value":0},"interpolate":{"value":"monotone"},"stroke":{"value":"steelblue"},"strokeWidth":{"value":3}}}}]}</graph>
  
<graph>{"version":2,"width":741,"height":269,"data":[{"name":"table","values":[{"x":0,"y":1},{"x":1,"y":3},{"x":2,"y":2},{"x":3,"y":4},{"x":4,"y":5}]}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"table","field":"x"}},{"name":"y","type":"linear","range":"height","nice":true,"domain":{"data":"table","field":"y"}}],"axes":[{"type":"x","scale":"x"},{"type":"y","scale":"y"}],"marks":[{"type":"line","from":{"data":"table"},"properties":{"enter":{"x":{"scale":"x","field":"x"},"y":{"scale":"y","field":"y"},"y2":{"scale":"y","value":0},"interpolate":{"value":"monotone"},"stroke":{"value":"steelblue"},"strokeWidth":{"value":3}}}}]}</graph>
+
===3===
  
 
<graph>{
 
<graph>{
Linia 747: Linia 1.100:
 
}
 
}
 
]
 
]
}</graph><graph>{
+
}</graph>
 +
 
 +
===4===
 +
 
 +
<graph>{
 
"version": 2,
 
"version": 2,
 
"width": 400,
 
"width": 400,
Linia 887: Linia 1.244:
  
  
 
+
===5===
  
 
<graph>{
 
<graph>{
Linia 1.203: Linia 1.560:
 
</graph>
 
</graph>
  
 
+
===6===
  
 
<graph>{
 
<graph>{
Linia 1.296: Linia 1.653:
 
</graph>
 
</graph>
  
 +
===7===
  
 
<graph>{
 
<graph>{
Linia 1.732: Linia 2.090:
 
</graph>
 
</graph>
  
 
+
===8===
 
 
  
 
<graph>{
 
<graph>{
Linia 1.890: Linia 2.247:
 
</graph>
 
</graph>
  
 
+
===9===
 
 
  
 
<graph>{
 
<graph>{
Linia 1.898: Linia 2.254:
 
</graph>
 
</graph>
  
 
+
===10===
 
 
 
 
  
 
<graph>{
 
<graph>{
Linia 2.293: Linia 2.647:
 
}</graph>
 
}</graph>
  
 
+
===11===
  
 
<graph>
 
<graph>
Linia 2.404: Linia 2.758:
 
</graph>
 
</graph>
  
 
+
===12===
  
 
<graph>
 
<graph>
Linia 3.301: Linia 3.655:
 
}</graph>
 
}</graph>
  
 
+
===14===
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
<graph>
 
<graph>
Linia 4.288: Linia 4.634:
 
}</graph>
 
}</graph>
  
 
+
===15===
 
 
 
 
  
 
<graph>
 
<graph>
Linia 4.353: Linia 4.697:
 
</graph>
 
</graph>
  
 +
===16===
  
 
<graph>{
 
<graph>{
Linia 4.463: Linia 4.808:
 
}</graph>
 
}</graph>
  
 +
===17===
  
 
<graph>
 
<graph>
Linia 4.544: Linia 4.890:
 
}</graph>
 
}</graph>
  
 +
===18===
  
 
<graph>
 
<graph>
Linia 4.731: Linia 5.078:
 
}</graph>
 
}</graph>
  
 +
===19===
  
 
<graph>
 
<graph>
Linia 4.837: Linia 5.185:
 
}</graph>
 
}</graph>
  
 +
===20===
  
 
<graph>
 
<graph>
Linia 4.914: Linia 5.263:
 
           "width": {"value": 1},
 
           "width": {"value": 1},
 
           "height": {"field": {"group": "height"}, "offset": 8},
 
           "height": {"field": {"group": "height"}, "offset": 8},
           "fill": {"value": "#888"}
+
           "fill": {"value": "#c00"}
 
         }
 
         }
 
       }
 
       }
Linia 4.962: Linia 5.311:
 
</graph>
 
</graph>
  
 +
===21===
  
 
<graph>
 
<graph>
Linia 5.056: Linia 5.406:
 
}</graph>
 
}</graph>
  
 +
===22===
  
 
<graph>
 
<graph>
Linia 5.143: Linia 5.494:
 
}</graph>
 
}</graph>
  
 +
===23===
  
 
<graph>
 
<graph>

Versiunea curentă din 1 octombrie 2021 09:36


-1

0

1


2

3













18293 / 201818793 / 2018147 / 2019




5

6

7

8

9

10

11

12

14

15

16

17

18

19

20

21

22

23