{"action":"created","issue":{"url":"https://api.github.com/repos/d3fc/d3fc-series/issues/23","repository_url":"https://api.github.com/repos/d3fc/d3fc-series","labels_url":"https://api.github.com/repos/d3fc/d3fc-series/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/d3fc/d3fc-series/issues/23/comments","events_url":"https://api.github.com/repos/d3fc/d3fc-series/issues/23/events","html_url":"https://github.com/d3fc/d3fc-series/pull/23","id":182116421,"number":23,"title":"feat: allow decoration of canvas multi series","user":{"login":"ColinEberhardt","id":1098110,"avatar_url":"https://avatars.githubusercontent.com/u/1098110?v=3","gravatar_id":"","url":"https://api.github.com/users/ColinEberhardt","html_url":"https://github.com/ColinEberhardt","followers_url":"https://api.github.com/users/ColinEberhardt/followers","following_url":"https://api.github.com/users/ColinEberhardt/following{/other_user}","gists_url":"https://api.github.com/users/ColinEberhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/ColinEberhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColinEberhardt/subscriptions","organizations_url":"https://api.github.com/users/ColinEberhardt/orgs","repos_url":"https://api.github.com/users/ColinEberhardt/repos","events_url":"https://api.github.com/users/ColinEberhardt/events{/privacy}","received_events_url":"https://api.github.com/users/ColinEberhardt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-10T21:09:45Z","updated_at":"2016-10-10T21:10:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/d3fc/d3fc-series/pulls/23","html_url":"https://github.com/d3fc/d3fc-series/pull/23","diff_url":"https://github.com/d3fc/d3fc-series/pull/23.diff","patch_url":"https://github.com/d3fc/d3fc-series/pull/23.patch"},"body":"This allows both the series and multi-series to be decorated.\r\n\r\nFor example, you can set the stroke by decorating one series component, and set the stroke of both via the multi.\r\n\r\ne.g. SVG (existing behaviour):\r\n\r\n```\r\nvar svgLine = fc.seriesSvgLine();\r\n\r\nvar svgLine2 = fc.seriesSvgLine()\r\n    .decorate((s) => {\r\n        s.enter()\r\n            .attr('stroke-dasharray', '5, 5');\r\n    });\r\n\r\nvar svgMulti = fc.seriesSvgMulti()\r\n    .series([svgLine, svgLine2])\r\n    .decorate((container, data, index) => {\r\n        container.enter()\r\n            .select('path')\r\n            .attr('stroke', (d, i) => i === 0 ? 'red' : 'green');\r\n    });\r\n```\r\n\r\nand now for canvas:\r\n\r\n```\r\nvar canvasLine = fc.seriesCanvasLine();\r\n\r\nvar canvasLine2 = fc.seriesCanvasLine()\r\n    .decorate((ctx) => {\r\n        ctx.setLineDash([5, 5]);\r\n    });\r\n\r\nvar canvasMulti = fc.seriesCanvasMulti()\r\n    .context(ctx)\r\n    .series([canvasLine, canvasLine2])\r\n    .decorate((ctx, data, index) => {\r\n        ctx.strokeStyle = index === 0 ? 'red' : 'green';\r\n    });\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/d3fc/d3fc-series/issues/comments/252747246","html_url":"https://github.com/d3fc/d3fc-series/pull/23#issuecomment-252747246","issue_url":"https://api.github.com/repos/d3fc/d3fc-series/issues/23","id":252747246,"user":{"login":"ColinEberhardt","id":1098110,"avatar_url":"https://avatars.githubusercontent.com/u/1098110?v=3","gravatar_id":"","url":"https://api.github.com/users/ColinEberhardt","html_url":"https://github.com/ColinEberhardt","followers_url":"https://api.github.com/users/ColinEberhardt/followers","following_url":"https://api.github.com/users/ColinEberhardt/following{/other_user}","gists_url":"https://api.github.com/users/ColinEberhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/ColinEberhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColinEberhardt/subscriptions","organizations_url":"https://api.github.com/users/ColinEberhardt/orgs","repos_url":"https://api.github.com/users/ColinEberhardt/repos","events_url":"https://api.github.com/users/ColinEberhardt/events{/privacy}","received_events_url":"https://api.github.com/users/ColinEberhardt/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T21:10:27Z","updated_at":"2016-10-10T21:10:27Z","body":"relates to the comments here: https://github.com/d3fc/d3fc-series/pull/16#issuecomment-249810992"}}
{"actor":{"display_login":"ColinEberhardt"}}