{"action":"created","issue":{"url":"https://api.github.com/repos/vega/vega/issues/310","labels_url":"https://api.github.com/repos/vega/vega/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/vega/vega/issues/310/comments","events_url":"https://api.github.com/repos/vega/vega/issues/310/events","html_url":"https://github.com/vega/vega/issues/310","id":97515899,"number":310,"title":"Streaming data API trouble","user":{"login":"rbishop-bah","id":3227777,"avatar_url":"https://avatars.githubusercontent.com/u/3227777?v=3","gravatar_id":"","url":"https://api.github.com/users/rbishop-bah","html_url":"https://github.com/rbishop-bah","followers_url":"https://api.github.com/users/rbishop-bah/followers","following_url":"https://api.github.com/users/rbishop-bah/following{/other_user}","gists_url":"https://api.github.com/users/rbishop-bah/gists{/gist_id}","starred_url":"https://api.github.com/users/rbishop-bah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbishop-bah/subscriptions","organizations_url":"https://api.github.com/users/rbishop-bah/orgs","repos_url":"https://api.github.com/users/rbishop-bah/repos","events_url":"https://api.github.com/users/rbishop-bah/events{/privacy}","received_events_url":"https://api.github.com/users/rbishop-bah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-27T17:39:09Z","updated_at":"2015-07-31T02:02:43Z","closed_at":null,"body":"I'm having major problems using the new streaming data API.  Specifically the view.data() function seems to be updating the values of the wrong property.  I'm seeing this both when updating one data set at a time and in batch mode.  \r\n\r\nIt's of course possible that I'm doing something wrong.  Consider this a placeholder or a chance to add some additional streaming data testing until I can narrow it down further and/or work up a small example that demonstrates the problem.  I figured it'd be best to create the issue early as it is blocking me from using Vega 2 and I imagine it would block many others as well."},"comment":{"url":"https://api.github.com/repos/vega/vega/issues/comments/126541544","html_url":"https://github.com/vega/vega/issues/310#issuecomment-126541544","issue_url":"https://api.github.com/repos/vega/vega/issues/310","id":126541544,"user":{"login":"arvind","id":42262,"avatar_url":"https://avatars.githubusercontent.com/u/42262?v=3","gravatar_id":"","url":"https://api.github.com/users/arvind","html_url":"https://github.com/arvind","followers_url":"https://api.github.com/users/arvind/followers","following_url":"https://api.github.com/users/arvind/following{/other_user}","gists_url":"https://api.github.com/users/arvind/gists{/gist_id}","starred_url":"https://api.github.com/users/arvind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvind/subscriptions","organizations_url":"https://api.github.com/users/arvind/orgs","repos_url":"https://api.github.com/users/arvind/repos","events_url":"https://api.github.com/users/arvind/events{/privacy}","received_events_url":"https://api.github.com/users/arvind/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T02:02:42Z","updated_at":"2015-07-31T02:02:42Z","body":"Thanks for including the GIF, I was just about to do the same :) Try it with the following spec for the rect marks:\r\n\r\n```json\r\n    {\r\n      \"type\": \"rect\",\r\n      \"from\": {\"data\": \"table\"},\r\n      \"properties\": {\r\n        \"enter\": {\r\n        },\r\n        \"update\": {\r\n          \"x\": {\"scale\": \"x\", \"field\": \"x\"},\r\n          \"width\": {\"scale\": \"x\", \"band\": true, \"offset\": -1},\r\n          \"y\": {\"scale\": \"y\", \"field\": \"y\"},\r\n          \"y2\": {\"scale\": \"y\", \"value\": 0},\r\n          \"fill\": {\"value\": \"steelblue\"}\r\n        },\r\n        \"hover\": {\r\n          \"fill\": {\"value\": \"red\"}\r\n        }\r\n      }\r\n    }\r\n```\r\n\r\nYou'll notice that I've moved the spatial properties from the `enter` property set to the `update`. As you may recall, `enter` properties are executed _only_ for new data. Update is run for new+existing data. With the spec in your GIF, only new rectangles are ever positioned. See Mike Bostock's [Thinking with Joins](http://bost.ocks.org/mike/join/) tutorial for more information about enter, update, and exit."}}