User:Pietrasagh/sandbox/grahannotationsdemo

{ "version":2, "width": 500, "height": 200,

"data": [ {     "name": "table", "values": [ {"x": 0, "y": 28, "c":0}, {"x": 100, "y": 43, "c":0}, {"x": 200, "y": 48, "c":0}, {"x": 300, "y": 19, "c":0}, {"x": 400, "y": 52, "c":0}, {"x": 500, "y": 24, "c":0}, {"x": 600, "y": 1, "c":0}, {"x": 700, "y": 17, "c":0}, {"x": 800, "y": 68, "c":0}, {"x": 900, "y": 49, "c":0} ]   }  ],

"scales": [ {     "name": "x", "type": "linear", "range": "width", "domain": {"data": "table", "field": "x"} },   {      "name": "y", "type": "linear", "range": "height", "nice": false, "clamp": false, "zero": true, "domain": {"data": "table", "field": "y"}, } ],  "axes": [ {"type":"x","format":"d", "scale": "x","orient":"bottom", "labelOverlap": true}, {"type":"y","format":"d","scale": "y","orient":"left", "labelOverlap": true} ], "marks": [   {         "type": "line", "from": {"data": "table"}, "properties": { "enter": { "x": {"scale": "x", "field": "x"}, "y": {"scale": "y", "field": "y"}, "strokeWidth": {"value": 2.5}, "stroke": {"value": "#1f77b4"} }           }    },	    {	      "type": "rect", "properties": { "enter": { "x": {"scale": "x","value": 200}, "y": {"scale": "y","value": 0}, "x2": {"scale": "x","value": 400}, "y2": {"scale": "y","value": 48}, "fill": {"value": "magenta"}, "opacity": {"value": 0.3} }	     }	    },  	    {	      "type": "rule", "properties": { "enter": { "x": {"scale": "x","value": 800}, "y": {"scale": "y","value": 0}, "x2": {"scale": "x","value": 800}, "y2": {"scale": "y","value": 68}, "stroke": {"value": "red"}, "strokeWidth": {"value": 2} }	     }	    }

] }