Plr : Différence entre versions

De wiki
Aller à : navigation, rechercher
Ligne 1 : Ligne 1 :
 
{{#tag:graph|
 
{{#tag:graph|
 
{
 
{
   "width": 600,
+
   "version": 2,
   "height": 1600,
+
   "width": 800,
   "padding": 5,
+
   "height": 200,
 
+
   "padding": {"top": 10, "left": 65, "bottom": 20, "right": 10},
   "signals": [
 
    {
 
      "name": "labels", "value": true,
 
      "bind": {"input": "checkbox"}
 
    },
 
    {
 
      "name": "layout", "value": "tidy",
 
      "bind": {"input": "radio", "options": ["tidy", "cluster"]}
 
    },
 
    {
 
      "name": "links", "value": "diagonal",
 
      "bind": {
 
        "input": "select",
 
        "options": ["line", "curve", "diagonal", "orthogonal"]
 
      }
 
    }
 
  ],
 
  
 
   "data": [
 
   "data": [
 
     {
 
     {
       "name": "tree",
+
       "name": "table",
       "url": "data/flare.json",
+
       "values": [
      "transform": [
+
        {"date": "14-07", "amount": 722 },
         {
+
         {"date": "14-08", "amount": 6330 },
          "type": "stratify",
+
        {"date": "14-09", "amount": 6418 },
          "key": "id",
+
        {"date": "14-10", "amount": 4719 },
          "parentKey": "parent"
+
         {"date": "14-11", "amount": 9035 },
         },
+
         {"date": "14-12", "amount": 7638 },
         {
+
        {"date": "15-01", "amount": 6721 },
          "type": "tree",
+
        {"date": "15-02", "amount": 6157 },
          "method": {"signal": "layout"},
+
        {"date": "15-03", "amount": 4074 },
          "size": [{"signal": "height"}, {"signal": "width - 100"}],
+
        {"date": "15-04", "amount": 5025 },
          "as": ["y", "x", "depth", "children"]
+
        {"date": "15-05", "amount": 5603 },
        }
+
        {"date": "15-06", "amount": 3395 },
      ]
+
        {"date": "15-07", "amount": 6191 },
    },
+
         {"date": "15-08", "amount": 4299 },
    {
+
         {"date": "15-09", "amount": 2793 },
      "name": "links",
+
        {"date": "15-10", "amount": 3025 },
      "source": "tree",
+
        {"date": "15-11", "amount": 4299 },
      "transform": [
+
         {"date": "15-12", "amount": 3748 },
         { "type": "treelinks" },
 
         {
 
          "type": "linkpath",
 
          "orient": "horizontal",
 
          "shape": {"signal": "links"}
 
         }
 
 
       ]
 
       ]
 
     }
 
     }
 
   ],
 
   ],
 
  "scales": [
 
    {
 
      "name": "color",
 
      "type": "sequential",
 
      "range": {"scheme": "magma"},
 
      "domain": {"data": "tree", "field": "depth"},
 
      "zero": true
 
    }
 
  ],
 
 
  "marks": [
 
    {
 
      "type": "path",
 
      "from": {"data": "links"},
 
      "encode": {
 
        "update": {
 
          "path": {"field": "path"},
 
          "stroke": {"value": "#ccc"}
 
        }
 
      }
 
    },
 
    {
 
      "type": "symbol",
 
      "from": {"data": "tree"},
 
      "encode": {
 
        "enter": {
 
          "size": {"value": 100},
 
          "stroke": {"value": "#fff"}
 
        },
 
        "update": {
 
          "x": {"field": "x"},
 
          "y": {"field": "y"},
 
          "fill": {"scale": "color", "field": "depth"}
 
        }
 
      }
 
    },
 
    {
 
      "type": "text",
 
      "from": {"data": "tree"},
 
      "encode": {
 
        "enter": {
 
          "text": {"field": "name"},
 
          "fontSize": {"value": 9},
 
          "baseline": {"value": "middle"}
 
        },
 
        "update": {
 
          "x": {"field": "x"},
 
          "y": {"field": "y"},
 
          "dx": {"signal": "datum.children ? -7 : 7"},
 
          "align": {"signal": "datum.children ? 'right' : 'left'"},
 
          "opacity": {"signal": "labels ? 1 : 0"}
 
        }
 
      }
 
    }
 
  ]
 
 
}
 
}
 
+
| mode=interactive }}
}}
 
  
 
Creation de PLR
 
Creation de PLR

Version du 6 février 2019 à 08:53

Creation de PLR

Phrase action emotion
Bon délire dab dab content
DANH ! droite pas content
nice nice y sourit très content