{"action":"created","comment":{"url":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/comments/23555083","id":23555083,"diff_hunk":"@@ -0,0 +1,91 @@\n+module ECharts.Legend where\n+\n+import Data.Maybe\n+import Data.StrMap \n+import Data.Argonaut.Core\n+import Data.Argonaut.Encode\n+import Data.Argonaut.Combinators\n+\n+import ECharts.Color\n+import ECharts.Common\n+import ECharts.Coords\n+import ECharts.Style.Text\n+import ECharts.Formatter\n+\n+data LegendItem = LegendString String |\n+  LegendItem {\n+    \"name\" :: Maybe String,\n+    \"icon\" :: Maybe String,\n+    \"textStyle\" :: Maybe TextStyle\n+    }\n+\n+instance legendItemEncodeJson :: EncodeJson LegendItem where\n+  encodeJson (LegendString name) = fromString name\n+  encodeJson (LegendItem obj) =\n+    fromObject $ fromList $\n+    [\n+      \"name\" := obj.name,\n+      \"icon\" := obj.icon,\n+      \"textStyle\" := obj.textStyle\n+    ]\n+\n+newtype Legend =\n+  Legend {\n+    \"show\" :: Maybe Boolean,\n+    \"orient\" :: Maybe Orient,\n+    \"x\" :: Maybe XPos,\n+    \"y\" :: Maybe YPos,\n+    \"backgroundColor\" :: Maybe Color,\n+    \"borderColor\" :: Maybe Color,\n+    \"borderWidth\" :: Maybe Number,\n+    \"padding\" :: Maybe (Corner Number),\n+    \"itemGap\" :: Maybe Number,\n+    \"itemHeight\" :: Maybe Number,\n+    \"itemWidth\" :: Maybe Number,\n+    \"textStyle\" :: Maybe TextStyle,\n+    \"formatter\" :: Maybe Formatter,\n+    \"selectedMode\" :: Maybe SelectedMode,\n+    \"selected\" :: Maybe (StrMap Boolean),\n+    \"data\" :: Maybe [LegendItem]","path":"src/ECharts/Legend.purs","position":49,"original_position":49,"commit_id":"40bac840be6c0206ea23e268e9066fba40162203","original_commit_id":"87d0220622d3c5772a4dce51c77da84cc6121f22","user":{"login":"jdegoes","id":156745,"avatar_url":"https://avatars.githubusercontent.com/u/156745?v=3","gravatar_id":"","url":"https://api.github.com/users/jdegoes","html_url":"https://github.com/jdegoes","followers_url":"https://api.github.com/users/jdegoes/followers","following_url":"https://api.github.com/users/jdegoes/following{/other_user}","gists_url":"https://api.github.com/users/jdegoes/gists{/gist_id}","starred_url":"https://api.github.com/users/jdegoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdegoes/subscriptions","organizations_url":"https://api.github.com/users/jdegoes/orgs","repos_url":"https://api.github.com/users/jdegoes/repos","events_url":"https://api.github.com/users/jdegoes/events{/privacy}","received_events_url":"https://api.github.com/users/jdegoes/received_events","type":"User","site_admin":false},"body":"For types which have a natural zero, like array, if the library interprets `null` the same as `[]`, then it may make sense to omit the `Maybe`, to simplify construction. Otherwise there are two redundant zeros: `Nothing` and `Just []`.","created_at":"2015-01-26T19:03:13Z","updated_at":"2015-01-26T19:03:13Z","html_url":"https://github.com/slamdata/purescript-echarts/pull/1#discussion_r23555083","pull_request_url":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/comments/23555083"},"html":{"href":"https://github.com/slamdata/purescript-echarts/pull/1#discussion_r23555083"},"pull_request":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1","id":28012198,"html_url":"https://github.com/slamdata/purescript-echarts/pull/1","diff_url":"https://github.com/slamdata/purescript-echarts/pull/1.diff","patch_url":"https://github.com/slamdata/purescript-echarts/pull/1.patch","issue_url":"https://api.github.com/repos/slamdata/purescript-echarts/issues/1","number":1,"state":"open","locked":false,"title":"all examples work","user":{"login":"cryogenian","id":10245930,"avatar_url":"https://avatars.githubusercontent.com/u/10245930?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogenian","html_url":"https://github.com/cryogenian","followers_url":"https://api.github.com/users/cryogenian/followers","following_url":"https://api.github.com/users/cryogenian/following{/other_user}","gists_url":"https://api.github.com/users/cryogenian/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogenian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogenian/subscriptions","organizations_url":"https://api.github.com/users/cryogenian/orgs","repos_url":"https://api.github.com/users/cryogenian/repos","events_url":"https://api.github.com/users/cryogenian/events{/privacy}","received_events_url":"https://api.github.com/users/cryogenian/received_events","type":"User","site_admin":false},"body":"to run: \"gulp dev\", if it does not work try \"gulp runner && gulp make-dev && gulp bundle-dev && gulp serve\" \r\npublic/example.js is compiled by pscMake and bundled by browserify version of examples. \r\nOne can use setOptionUnsafe with any argument or setOption with Echarts.Option for better type safety. \r\n","created_at":"2015-01-26T08:46:20Z","updated_at":"2015-01-26T19:03:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a180d34911bfd69e3700deb586fbb362aaa9c739","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1/commits","review_comments_url":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1/comments","review_comment_url":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/comments/{number}","comments_url":"https://api.github.com/repos/slamdata/purescript-echarts/issues/1/comments","statuses_url":"https://api.github.com/repos/slamdata/purescript-echarts/statuses/40bac840be6c0206ea23e268e9066fba40162203","head":{"label":"cryogenian:master","ref":"master","sha":"40bac840be6c0206ea23e268e9066fba40162203","user":{"login":"cryogenian","id":10245930,"avatar_url":"https://avatars.githubusercontent.com/u/10245930?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogenian","html_url":"https://github.com/cryogenian","followers_url":"https://api.github.com/users/cryogenian/followers","following_url":"https://api.github.com/users/cryogenian/following{/other_user}","gists_url":"https://api.github.com/users/cryogenian/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogenian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogenian/subscriptions","organizations_url":"https://api.github.com/users/cryogenian/orgs","repos_url":"https://api.github.com/users/cryogenian/repos","events_url":"https://api.github.com/users/cryogenian/events{/privacy}","received_events_url":"https://api.github.com/users/cryogenian/received_events","type":"User","site_admin":false},"repo":{"id":29421219,"name":"purescript-echarts","full_name":"cryogenian/purescript-echarts","owner":{"login":"cryogenian","id":10245930,"avatar_url":"https://avatars.githubusercontent.com/u/10245930?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogenian","html_url":"https://github.com/cryogenian","followers_url":"https://api.github.com/users/cryogenian/followers","following_url":"https://api.github.com/users/cryogenian/following{/other_user}","gists_url":"https://api.github.com/users/cryogenian/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogenian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogenian/subscriptions","organizations_url":"https://api.github.com/users/cryogenian/orgs","repos_url":"https://api.github.com/users/cryogenian/repos","events_url":"https://api.github.com/users/cryogenian/events{/privacy}","received_events_url":"https://api.github.com/users/cryogenian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cryogenian/purescript-echarts","description":"Purescript bindings for Baidu's Echarts library","fork":true,"url":"https://api.github.com/repos/cryogenian/purescript-echarts","forks_url":"https://api.github.com/repos/cryogenian/purescript-echarts/forks","keys_url":"https://api.github.com/repos/cryogenian/purescript-echarts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cryogenian/purescript-echarts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cryogenian/purescript-echarts/teams","hooks_url":"https://api.github.com/repos/cryogenian/purescript-echarts/hooks","issue_events_url":"https://api.github.com/repos/cryogenian/purescript-echarts/issues/events{/number}","events_url":"https://api.github.com/repos/cryogenian/purescript-echarts/events","assignees_url":"https://api.github.com/repos/cryogenian/purescript-echarts/assignees{/user}","branches_url":"https://api.github.com/repos/cryogenian/purescript-echarts/branches{/branch}","tags_url":"https://api.github.com/repos/cryogenian/purescript-echarts/tags","blobs_url":"https://api.github.com/repos/cryogenian/purescript-echarts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cryogenian/purescript-echarts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cryogenian/purescript-echarts/git/refs{/sha}","trees_url":"https://api.github.com/repos/cryogenian/purescript-echarts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cryogenian/purescript-echarts/statuses/{sha}","languages_url":"https://api.github.com/repos/cryogenian/purescript-echarts/languages","stargazers_url":"https://api.github.com/repos/cryogenian/purescript-echarts/stargazers","contributors_url":"https://api.github.com/repos/cryogenian/purescript-echarts/contributors","subscribers_url":"https://api.github.com/repos/cryogenian/purescript-echarts/subscribers","subscription_url":"https://api.github.com/repos/cryogenian/purescript-echarts/subscription","commits_url":"https://api.github.com/repos/cryogenian/purescript-echarts/commits{/sha}","git_commits_url":"https://api.github.com/repos/cryogenian/purescript-echarts/git/commits{/sha}","comments_url":"https://api.github.com/repos/cryogenian/purescript-echarts/comments{/number}","issue_comment_url":"https://api.github.com/repos/cryogenian/purescript-echarts/issues/comments/{number}","contents_url":"https://api.github.com/repos/cryogenian/purescript-echarts/contents/{+path}","compare_url":"https://api.github.com/repos/cryogenian/purescript-echarts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cryogenian/purescript-echarts/merges","archive_url":"https://api.github.com/repos/cryogenian/purescript-echarts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cryogenian/purescript-echarts/downloads","issues_url":"https://api.github.com/repos/cryogenian/purescript-echarts/issues{/number}","pulls_url":"https://api.github.com/repos/cryogenian/purescript-echarts/pulls{/number}","milestones_url":"https://api.github.com/repos/cryogenian/purescript-echarts/milestones{/number}","notifications_url":"https://api.github.com/repos/cryogenian/purescript-echarts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cryogenian/purescript-echarts/labels{/name}","releases_url":"https://api.github.com/repos/cryogenian/purescript-echarts/releases{/id}","created_at":"2015-01-18T09:28:29Z","updated_at":"2015-01-26T18:23:32Z","pushed_at":"2015-01-26T18:23:32Z","git_url":"git://github.com/cryogenian/purescript-echarts.git","ssh_url":"git@github.com:cryogenian/purescript-echarts.git","clone_url":"https://github.com/cryogenian/purescript-echarts.git","svn_url":"https://github.com/cryogenian/purescript-echarts","homepage":null,"size":507,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"slamdata:master","ref":"master","sha":"17426a1ba309de252f9356e79e693cd2f46edef1","user":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"repo":{"id":29357277,"name":"purescript-echarts","full_name":"slamdata/purescript-echarts","owner":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slamdata/purescript-echarts","description":"Purescript bindings for Baidu's Echarts library","fork":false,"url":"https://api.github.com/repos/slamdata/purescript-echarts","forks_url":"https://api.github.com/repos/slamdata/purescript-echarts/forks","keys_url":"https://api.github.com/repos/slamdata/purescript-echarts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slamdata/purescript-echarts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slamdata/purescript-echarts/teams","hooks_url":"https://api.github.com/repos/slamdata/purescript-echarts/hooks","issue_events_url":"https://api.github.com/repos/slamdata/purescript-echarts/issues/events{/number}","events_url":"https://api.github.com/repos/slamdata/purescript-echarts/events","assignees_url":"https://api.github.com/repos/slamdata/purescript-echarts/assignees{/user}","branches_url":"https://api.github.com/repos/slamdata/purescript-echarts/branches{/branch}","tags_url":"https://api.github.com/repos/slamdata/purescript-echarts/tags","blobs_url":"https://api.github.com/repos/slamdata/purescript-echarts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slamdata/purescript-echarts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slamdata/purescript-echarts/git/refs{/sha}","trees_url":"https://api.github.com/repos/slamdata/purescript-echarts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slamdata/purescript-echarts/statuses/{sha}","languages_url":"https://api.github.com/repos/slamdata/purescript-echarts/languages","stargazers_url":"https://api.github.com/repos/slamdata/purescript-echarts/stargazers","contributors_url":"https://api.github.com/repos/slamdata/purescript-echarts/contributors","subscribers_url":"https://api.github.com/repos/slamdata/purescript-echarts/subscribers","subscription_url":"https://api.github.com/repos/slamdata/purescript-echarts/subscription","commits_url":"https://api.github.com/repos/slamdata/purescript-echarts/commits{/sha}","git_commits_url":"https://api.github.com/repos/slamdata/purescript-echarts/git/commits{/sha}","comments_url":"https://api.github.com/repos/slamdata/purescript-echarts/comments{/number}","issue_comment_url":"https://api.github.com/repos/slamdata/purescript-echarts/issues/comments/{number}","contents_url":"https://api.github.com/repos/slamdata/purescript-echarts/contents/{+path}","compare_url":"https://api.github.com/repos/slamdata/purescript-echarts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slamdata/purescript-echarts/merges","archive_url":"https://api.github.com/repos/slamdata/purescript-echarts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slamdata/purescript-echarts/downloads","issues_url":"https://api.github.com/repos/slamdata/purescript-echarts/issues{/number}","pulls_url":"https://api.github.com/repos/slamdata/purescript-echarts/pulls{/number}","milestones_url":"https://api.github.com/repos/slamdata/purescript-echarts/milestones{/number}","notifications_url":"https://api.github.com/repos/slamdata/purescript-echarts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slamdata/purescript-echarts/labels{/name}","releases_url":"https://api.github.com/repos/slamdata/purescript-echarts/releases{/id}","created_at":"2015-01-16T16:37:37Z","updated_at":"2015-01-17T01:33:07Z","pushed_at":"2015-01-17T01:33:06Z","git_url":"git://github.com/slamdata/purescript-echarts.git","ssh_url":"git@github.com:slamdata/purescript-echarts.git","clone_url":"https://github.com/slamdata/purescript-echarts.git","svn_url":"https://github.com/slamdata/purescript-echarts","homepage":null,"size":91,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1"},"html":{"href":"https://github.com/slamdata/purescript-echarts/pull/1"},"issue":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/issues/1"},"comments":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/slamdata/purescript-echarts/statuses/40bac840be6c0206ea23e268e9066fba40162203"}}}}