{"action":"created","issue":{"url":"https://api.github.com/repos/stewones/angular-morris-chart/issues/32","labels_url":"https://api.github.com/repos/stewones/angular-morris-chart/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/stewones/angular-morris-chart/issues/32/comments","events_url":"https://api.github.com/repos/stewones/angular-morris-chart/issues/32/events","html_url":"https://github.com/stewones/angular-morris-chart/issues/32","id":120754373,"number":32,"title":"Documentation and Examples","user":{"login":"semaja2","id":7195139,"avatar_url":"https://avatars.githubusercontent.com/u/7195139?v=3","gravatar_id":"","url":"https://api.github.com/users/semaja2","html_url":"https://github.com/semaja2","followers_url":"https://api.github.com/users/semaja2/followers","following_url":"https://api.github.com/users/semaja2/following{/other_user}","gists_url":"https://api.github.com/users/semaja2/gists{/gist_id}","starred_url":"https://api.github.com/users/semaja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semaja2/subscriptions","organizations_url":"https://api.github.com/users/semaja2/orgs","repos_url":"https://api.github.com/users/semaja2/repos","events_url":"https://api.github.com/users/semaja2/events{/privacy}","received_events_url":"https://api.github.com/users/semaja2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-07T11:31:41Z","updated_at":"2015-12-07T12:43:37Z","closed_at":null,"body":"Hi Guys,\r\n\r\nI have been using MorrisJS in other projects with out angular and thought it would be good to use your AngularJS version, however I am having trouble migrating my code to your syntaxes and found that whilst some features have been added according to change logs, the documentation and examples do not reflect these features\r\n\r\nCould we please get some examples or assistance in using the below options?\r\n\r\n````\r\nwindow.graph = Morris.Bar({\r\n        element: 'timesheet-chart',\r\n        data: data.week,\r\n        xkey: ['date'],\r\n        xLabels: 'day',\r\n        ymin: 0,\r\n        ykeys: ['logged'],\r\n        labels: ['Hours Logged'],\r\n        hideHover: false,\r\n        xLabelMargin: 10,\r\n        xLabelAngle: 0,\r\n        xLabelFormat: function(date) {\r\n          var weekday = new Array(7);\r\n          weekday[0]=  \"Sunday\";\r\n          weekday[1] = \"Monday\";\r\n          weekday[2] = \"Tuesday\";\r\n          weekday[3] = \"Wednesday\";\r\n          weekday[4] = \"Thursday\";\r\n          weekday[5] = \"Friday\";\r\n          weekday[6] = \"Saturday\";\r\n\r\n          var dt1   = parseInt(date.label.substring(0,2));\r\n          var mon1  = parseInt(date.label.substring(3,5));\r\n          var yr1   = parseInt(date.label.substring(6,10));\r\n          var d = new Date(yr1, mon1-1, dt1);\r\n          return weekday[d.getDay()];\r\n        },\r\n        dateFormat: function(date) {\r\n          d = new Date(date);\r\n          return d.getDate()+'-'+(d.getMonth()+1)+'-'+d.getFullYear();\r\n          },\r\n        barColors: function(row,series,type){\r\n          if (series.index == 0) {\r\n            if(row!=undefined && row.y<4){\r\n              return \"#a94442\"; // danger\r\n            } else if (row.y < 7.5) {\r\n              return \"#8a6d3b\"; // warning\r\n            } else {\r\n              return \"#31708f\"; // success\r\n            }\r\n          } else {\r\n            return \"#31808f\"; // success\r\n          }\r\n        },\r\n        resize: true\r\n      });\r\n    }\r\n````"},"comment":{"url":"https://api.github.com/repos/stewones/angular-morris-chart/issues/comments/162515234","html_url":"https://github.com/stewones/angular-morris-chart/issues/32#issuecomment-162515234","issue_url":"https://api.github.com/repos/stewones/angular-morris-chart/issues/32","id":162515234,"user":{"login":"semaja2","id":7195139,"avatar_url":"https://avatars.githubusercontent.com/u/7195139?v=3","gravatar_id":"","url":"https://api.github.com/users/semaja2","html_url":"https://github.com/semaja2","followers_url":"https://api.github.com/users/semaja2/followers","following_url":"https://api.github.com/users/semaja2/following{/other_user}","gists_url":"https://api.github.com/users/semaja2/gists{/gist_id}","starred_url":"https://api.github.com/users/semaja2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semaja2/subscriptions","organizations_url":"https://api.github.com/users/semaja2/orgs","repos_url":"https://api.github.com/users/semaja2/repos","events_url":"https://api.github.com/users/semaja2/events{/privacy}","received_events_url":"https://api.github.com/users/semaja2/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T12:43:37Z","updated_at":"2015-12-07T12:43:37Z","body":"I am using the code from https://angular-morris-chart.stpa.co with the examples on that page which would be as below\r\n\r\n````\r\n<div\r\nbar-chart \r\nbar-data='[\r\n    { y: \"2006\", a: 100, b: 90 },\r\n    { y: \"2007\", a: 75,  b: 65 },\r\n    { y: \"2008\", a: 50,  b: 40 },\r\n    { y: \"2009\", a: 75,  b: 65 },\r\n    { y: \"2010\", a: 50,  b: 40 },\r\n    { y: \"2011\", a: 75,  b: 65 },\r\n    { y: \"2012\", a: 100, b: 90 }\r\n]'\r\nbar-x='y'\r\nbar-y='[\"a\", \"b\"]'\r\nbar-labels='[\"Series A\", \"Series B\"]'\r\nbar-colors='[\"#31C0BE\", \"#c7254e\"]'>\r\n</div>\r\n````"}}