DynamicGraph3

From Wikipedia, the free encyclopedia


<graph>

{
  "version": 2,
  "data": [{
  	"name": "oneElementDummyList",
  	"values": [null]
  }],
  "signals": [
    {
      "name": "imageUrlSignal",
      "init": null,
      "streams": [
        {"type": "@handle:mousedown","expr": "'wikirawupload://upload.wikimedia.beta.wmflabs.org/wikipedia/commons/c/c5/Test-1447880552.720793.png'"},
        {"type": "mouseup","expr": "null"}
      ]
    }
  ],
  "marks": [
    {
      "name": "handle",
      "type": "path",
      "properties": {
        "enter": {
          "x": {"value": 200},
          "y": {"value": 40},
          "path": {"value": "m-5.5,-10l0,20l11.5,-10l-11.5,-10z"},
          "stroke": {"value": "#880"},
          "strokeWidth": {"value": 2.5}
        },
        "update": {"fill": {"value": "#fff"} },
        "hover": {"fill": {"value": "#f00"} }
      }
    },
    {
      "type": "image",
      "from":  {
      	"data":"oneElementDummyList",
      	"transform": [{"type": "filter", "test": "imageUrlSignal != null"}]
      },
      "properties": {
        "update": {
          "url": { "signal": "imageUrlSignal" },
          "width": {"value": 200},
          "height": {"value": 200}
        }
      }
    }
  ]
}

</graph>