{"action":"created","issue":{"url":"https://api.github.com/repos/trifacta/vega/issues/280","labels_url":"https://api.github.com/repos/trifacta/vega/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/trifacta/vega/issues/280/comments","events_url":"https://api.github.com/repos/trifacta/vega/issues/280/events","html_url":"https://github.com/trifacta/vega/issues/280","id":84355105,"number":280,"title":"reverse doesn’t work with ordinal scale","user":{"login":"kanitw","id":111269,"avatar_url":"https://avatars.githubusercontent.com/u/111269?v=3","gravatar_id":"","url":"https://api.github.com/users/kanitw","html_url":"https://github.com/kanitw","followers_url":"https://api.github.com/users/kanitw/followers","following_url":"https://api.github.com/users/kanitw/following{/other_user}","gists_url":"https://api.github.com/users/kanitw/gists{/gist_id}","starred_url":"https://api.github.com/users/kanitw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanitw/subscriptions","organizations_url":"https://api.github.com/users/kanitw/orgs","repos_url":"https://api.github.com/users/kanitw/repos","events_url":"https://api.github.com/users/kanitw/events{/privacy}","received_events_url":"https://api.github.com/users/kanitw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-03T04:37:30Z","updated_at":"2015-06-30T23:57:40Z","closed_at":"2015-06-30T23:57:40Z","body":"Swapping scale “y”’s reverse between `true` and `false` doesn’t change anything.  \r\n\r\n```\r\n{\r\n  \"width\": 400,\r\n  \"height\": 210,\r\n  \"padding\": \"auto\",\r\n  \"data\": [\r\n    {\r\n      \"name\": \"raw\",\r\n      \"format\": {\r\n        \"type\": \"json\",\r\n        \"parse\": {\"count\": \"number\",\"Acceleration\": \"number\"}\r\n      },\r\n      \"url\": \"data/cars.json\",\r\n      \"transform\": [\r\n        {\r\n          \"type\": \"filter\",\r\n          \"test\": \"d.data.Acceleration!==null\"\r\n        }\r\n      ]\r\n    },\r\n    {\r\n      \"name\": \"table\",\r\n      \"source\": \"raw\",\r\n      \"transform\": [\r\n        {\r\n          \"type\": \"bin\",\r\n          \"field\": \"data.Acceleration\",\r\n          \"output\": \"data.bin_Acceleration\",\r\n          \"maxbins\": 15\r\n        },\r\n        {\r\n          \"type\": \"aggregate\",\r\n          \"groupby\": [\"data.bin_Acceleration\"],\r\n          \"fields\": [{\"op\": \"count\",\"field\": \"*\"}]\r\n        }\r\n      ]\r\n    }\r\n  ],\r\n  \"marks\": [\r\n    {\r\n      \"_name\": \"cell\",\r\n      \"type\": \"group\",\r\n      \"properties\": {\r\n        \"enter\": {\"width\": {\"value\": 400},\"height\": {\"value\": 210}}\r\n      },\r\n      \"scales\": [\r\n        {\r\n          \"name\": \"x\",\r\n          \"type\": \"linear\",\r\n          \"domain\": {\"data\": \"table\",\"field\": \"data.count\"},\r\n          \"range\": [0,400],\r\n          \"zero\": true,\r\n          \"reverse\": false,\r\n          \"round\": true,\r\n          \"nice\": true\r\n        },\r\n        {\r\n          \"name\": \"y\",\r\n          \"type\": \"ordinal\",\r\n          \"domain\": {\"data\": \"table\",\"field\": \"data.bin_Acceleration\"},\r\n          \"sort\": true,\r\n          \"reverse\": true,\r\n          \"bandWidth\": 21,\r\n          \"round\": true,\r\n          \"nice\": true,\r\n          \"points\": true,\r\n          \"padding\": 1\r\n        }\r\n      ],\r\n      \"axes\": [\r\n        {\r\n          \"type\": \"x\",\r\n          \"scale\": \"x\",\r\n          \"grid\": true,\r\n          \"layer\": \"back\",\r\n          \"properties\": {\r\n            \"grid\": {\r\n              \"stroke\": {\"value\": \"black\"},\r\n              \"opacity\": {\"value\": 0.08}\r\n            },\r\n            \"labels\": {\r\n              \"text\": {\"template\": \"{{data | number:'.3s'}}\"}\r\n            }\r\n          },\r\n          \"title\": \"Number of Records\",\r\n          \"titleOffset\": 38,\r\n          \"ticks\": 5\r\n        },\r\n        {\r\n          \"type\": \"y\",\r\n          \"scale\": \"y\",\r\n          \"grid\": true,\r\n          \"layer\": \"back\",\r\n          \"properties\": {\r\n            \"grid\": {\r\n              \"stroke\": {\"value\": \"black\"},\r\n              \"opacity\": {\"value\": 0.08}\r\n            },\r\n            \"labels\": {\r\n              \"text\": {\"template\": \"{{data | number:'.3s'}}\"}\r\n            }\r\n          },\r\n          \"title\": \"BIN(Acceleration)\",\r\n          \"titleOffset\": 140\r\n        }\r\n      ],\r\n      \"marks\": [\r\n        {\r\n          \"type\": \"symbol\",\r\n          \"from\": {\"data\": \"table\"},\r\n          \"properties\": {\r\n            \"enter\": {\r\n              \"x\": {\"scale\": \"x\",\"field\": \"data.count\"},\r\n              \"y\": {\r\n                \"scale\": \"y\",\r\n                \"field\": \"data.bin_Acceleration\"\r\n              },\r\n              \"size\": {\"value\": 30},\r\n              \"shape\": {\"value\": \"circle\"},\r\n              \"stroke\": {\"value\": \"steelblue\"},\r\n              \"opacity\": {\"value\": 1},\r\n              \"strokeWidth\": {\"value\": 2}\r\n            },\r\n            \"update\": {\r\n              \"x\": {\"scale\": \"x\",\"field\": \"data.count\"},\r\n              \"y\": {\r\n                \"scale\": \"y\",\r\n                \"field\": \"data.bin_Acceleration\"\r\n              },\r\n              \"size\": {\"value\": 30},\r\n              \"shape\": {\"value\": \"circle\"},\r\n              \"stroke\": {\"value\": \"steelblue\"},\r\n              \"opacity\": {\"value\": 1},\r\n              \"strokeWidth\": {\"value\": 2}\r\n            }\r\n          }\r\n        }\r\n      ],\r\n      \"legends\": []\r\n    }\r\n  ],\r\n  \"scales\": []\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/trifacta/vega/issues/comments/117374998","html_url":"https://github.com/trifacta/vega/issues/280#issuecomment-117374998","issue_url":"https://api.github.com/repos/trifacta/vega/issues/280","id":117374998,"user":{"login":"jheer","id":202799,"avatar_url":"https://avatars.githubusercontent.com/u/202799?v=3","gravatar_id":"","url":"https://api.github.com/users/jheer","html_url":"https://github.com/jheer","followers_url":"https://api.github.com/users/jheer/followers","following_url":"https://api.github.com/users/jheer/following{/other_user}","gists_url":"https://api.github.com/users/jheer/gists{/gist_id}","starred_url":"https://api.github.com/users/jheer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jheer/subscriptions","organizations_url":"https://api.github.com/users/jheer/orgs","repos_url":"https://api.github.com/users/jheer/repos","events_url":"https://api.github.com/users/jheer/events{/privacy}","received_events_url":"https://api.github.com/users/jheer/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T23:57:40Z","updated_at":"2015-06-30T23:57:40Z","body":"Addressed in commit a7e57e5.\r\n\r\nBTW, here is a working example spec to test with:\r\n```\r\n{\r\n  \"width\": 400,\r\n  \"height\": 210,\r\n  \"padding\": \"auto\",\r\n  \"data\": [\r\n    {\r\n      \"name\": \"raw\",\r\n      \"format\": {\r\n        \"type\": \"json\"\r\n      },\r\n      \"url\": \"data/cars.json\",\r\n      \"transform\": [\r\n        {\r\n          \"type\": \"filter\",\r\n          \"test\": \"d.data.acc!==null\"\r\n        }\r\n      ]\r\n    },\r\n    {\r\n      \"name\": \"table\",\r\n      \"source\": \"raw\",\r\n      \"transform\": [\r\n        {\r\n          \"type\": \"bin\",\r\n          \"field\": \"data.acc\",\r\n          \"output\": \"data.bin_acc\",\r\n          \"maxbins\": 15\r\n        },\r\n        {\r\n          \"type\": \"aggregate\",\r\n          \"groupby\": [\"data.bin_acc\"],\r\n          \"fields\": [{\"op\": \"count\", \"field\": \"*\"}]\r\n        }\r\n      ]\r\n    }\r\n  ],\r\n  \"marks\": [\r\n    {\r\n      \"_name\": \"cell\",\r\n      \"type\": \"group\",\r\n      \"properties\": {\r\n        \"enter\": {\"width\": {\"value\": 400},\"height\": {\"value\": 210}}\r\n      },\r\n      \"scales\": [\r\n        {\r\n          \"name\": \"x\",\r\n          \"type\": \"linear\",\r\n          \"domain\": {\"data\": \"table\",\"field\": \"data.count\"},\r\n          \"range\": [0,400],\r\n          \"zero\": true,\r\n          \"round\": true,\r\n          \"nice\": true,\r\n          \"reverse\": false\r\n        },\r\n        {\r\n          \"name\": \"y\",\r\n          \"type\": \"ordinal\",\r\n          \"domain\": {\"data\": \"table\",\"field\": \"data.bin_acc\"},\r\n          \"range\": \"height\",\r\n          \"sort\": true,\r\n          \"reverse\": true,\r\n          \"bandWidth\": 21,\r\n          \"round\": true,\r\n          \"nice\": true,\r\n          \"points\": true,\r\n          \"padding\": 1\r\n        }\r\n      ],\r\n      \"axes\": [\r\n        {\r\n          \"type\": \"x\",\r\n          \"scale\": \"x\",\r\n          \"grid\": true,\r\n          \"layer\": \"back\",\r\n          \"properties\": {\r\n            \"grid\": {\r\n              \"stroke\": {\"value\": \"black\"},\r\n              \"opacity\": {\"value\": 0.08}\r\n            },\r\n            \"labels\": {\r\n              \"text\": {\"template\": \"{{data | number:'.3s'}}\"}\r\n            }\r\n          },\r\n          \"title\": \"Number of Records\",\r\n          \"titleOffset\": 38,\r\n          \"ticks\": 5\r\n        },\r\n        {\r\n          \"type\": \"y\",\r\n          \"scale\": \"y\",\r\n          \"grid\": true,\r\n          \"layer\": \"back\",\r\n          \"properties\": {\r\n            \"grid\": {\r\n              \"stroke\": {\"value\": \"black\"},\r\n              \"opacity\": {\"value\": 0.08}\r\n            },\r\n            \"labels\": {\r\n              \"text\": {\"template\": \"{{data | number:'.3s'}}\"}\r\n            }\r\n          },\r\n          \"title\": \"BIN(Acceleration)\",\r\n          \"titleOffset\": 60\r\n        }\r\n      ],\r\n      \"marks\": [\r\n        {\r\n          \"type\": \"symbol\",\r\n          \"from\": {\"data\": \"table\"},\r\n          \"properties\": {\r\n            \"enter\": {\r\n              \"x\": {\"scale\": \"x\",\"field\": \"data.count\"},\r\n              \"y\": {\r\n                \"scale\": \"y\",\r\n                \"field\": \"data.bin_acc\"\r\n              },\r\n              \"size\": {\"value\": 30},\r\n              \"shape\": {\"value\": \"circle\"},\r\n              \"stroke\": {\"value\": \"steelblue\"},\r\n              \"opacity\": {\"value\": 1},\r\n              \"strokeWidth\": {\"value\": 2}\r\n            },\r\n            \"update\": {\r\n              \"x\": {\"scale\": \"x\",\"field\": \"data.count\"},\r\n              \"y\": {\r\n                \"scale\": \"y\",\r\n                \"field\": \"data.bin_acc\"\r\n              },\r\n              \"size\": {\"value\": 30},\r\n              \"shape\": {\"value\": \"circle\"},\r\n              \"stroke\": {\"value\": \"steelblue\"},\r\n              \"opacity\": {\"value\": 1},\r\n              \"strokeWidth\": {\"value\": 2}\r\n            }\r\n          }\r\n        }\r\n      ],\r\n      \"legends\": []\r\n    }\r\n  ],\r\n  \"scales\": []\r\n}\r\n```"}}