{"action":"created","issue":{"url":"https://api.github.com/repos/n3-charts/line-chart/issues/378","labels_url":"https://api.github.com/repos/n3-charts/line-chart/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/n3-charts/line-chart/issues/378/comments","events_url":"https://api.github.com/repos/n3-charts/line-chart/issues/378/events","html_url":"https://github.com/n3-charts/line-chart/issues/378","id":117994308,"number":378,"title":"With angular-gridster, endless digest loop on item resize","user":{"login":"pihomeserver","id":3817578,"avatar_url":"https://avatars.githubusercontent.com/u/3817578?v=3","gravatar_id":"","url":"https://api.github.com/users/pihomeserver","html_url":"https://github.com/pihomeserver","followers_url":"https://api.github.com/users/pihomeserver/followers","following_url":"https://api.github.com/users/pihomeserver/following{/other_user}","gists_url":"https://api.github.com/users/pihomeserver/gists{/gist_id}","starred_url":"https://api.github.com/users/pihomeserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pihomeserver/subscriptions","organizations_url":"https://api.github.com/users/pihomeserver/orgs","repos_url":"https://api.github.com/users/pihomeserver/repos","events_url":"https://api.github.com/users/pihomeserver/events{/privacy}","received_events_url":"https://api.github.com/users/pihomeserver/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-20T08:45:47Z","updated_at":"2015-11-24T10:52:05Z","closed_at":"2015-11-24T10:52:05Z","body":"Hi,\r\n\r\nUsing linechart directive in a directive used as a widget in a dashboard built using gridster, I have two issues : the chart does not take the full width/heigh but i will handle that later as for now when i resize a gridster element i have a crash saying that the app went in a digest endless loop.\r\nHere is a widget content (template of a directive):\r\n```\r\n<div class=\"widget-main\">\r\n\t<div ng-show=\"widget.loadingData\" class=\"loader\">Loading...</div>\r\n\t<widgetContentElement ng-show=\"!widget.loadingData\"></widgetContentElement>\r\n</div>\r\n```\r\nwidgetContentElement directive is \r\n```\r\n<div id=\"linechartParent\">\r\n\t<linechart data=\"chartData\" options=\"chartOptions\" mode=\"\" width=\"\" height=\"\"></linechart>\r\n</div>\r\n```\r\nchartData is a new empty array and chartOptions is \r\n```\r\n\t\t\t$scope.chartOptions = {\r\n\t\t\t  axes: {\r\n\t\t\t    x: {key: 'x', type: 'date'},\r\n\t\t\t    y: {type: 'linear', ticks: 5, innerTicks: true, grid: true}\r\n\t\t\t  },\r\n\t\t\t  series: [\r\n\t\t\t    {y: 'value', color: 'steelblue', thickness: '1px', type: 'area', striped: true, label: 'Pouet'}\r\n\t\t\t  ],\r\n\t\t\t  lineMode: 'linear',\r\n\t\t\t  tension: 0.7,\r\n\t\t\t  tooltip: {mode: 'scrubber', formatter: function(x, y, series) {return 'pouet';}},\r\n\t\t\t  drawLegend: false,\r\n\t\t\t  drawDots: false,\r\n\t\t\t  hideOverflow: false,\r\n\t\t\t  columnsHGap: 5\r\n\t\t\t}\r\n```\r\nI use the latest version (master branch not the v2) and i checks that the PR #239 is included\r\n\r\nThe error message is the following and i see that it seems to come from width and/or height that are always updating\r\n```\r\n10 $digest() iterations reached. Aborting!\r\nWatchers fired in the last 5 iterations: [[{\"msg\":\"options\",\"newVal\":{\"axes\":{\"x\":{\"key\":\"x\",\"type\":\"date\"},\"y\":{\"type\":\"linear\",\"ticks\":5,\"innerTicks\":true,\"grid\":true}},\"series\":[{\"y\":\"value\",\"color\":\"steelblue\",\"thickness\":\"1px\",\"type\":\"area\",\"striped\":true,\"label\":\"Pouet\",\"axis\":\"y\",\"dotSize\":2,\"id\":\"series_0\"}],\"lineMode\":\"linear\",\"tension\":0.7,\"tooltip\":{\"mode\":\"scrubber\"},\"drawLegend\":false,\"drawDots\":false,\"hideOverflow\":false,\"columnsHGap\":5,\"stacks\":[],\"margin\":{\"top\":20,\"right\":50,\"bottom\":60,\"left\":50,\"width\":703,\"height\":775},\"toggle\":true},\"oldVal\":{\"axes\":{\"x\":{\"key\":\"x\",\"type\":\"date\"},\"y\":{\"type\":\"linear\",\"ticks\":5,\"innerTicks\":true,\"grid\":true}},\"series\":[{\"y\":\"value\",\"color\":\"steelblue\",\"thickness\":\"1px\",\"type\":\"area\",\"striped\":true,\"label\":\"Pouet\",\"axis\":\"y\",\"dotSize\":2,\"id\":\"series_0\"}],\"lineMode\":\"linear\",\"tension\":0.7,\"tooltip\":{\"mode\":\"scrubber\"},\"drawLegend\":false,\"drawDots\":false,\"hideOverflow\":false,\"columnsHGap\":5,\"stacks\":[],\"margin\":{\"top\":20,\"right\":50,\"bottom\":60,\"left\":50,\"width\":703,\"height\":625},\"toggle\":true}}],[{\"msg\":\"options\",\"newVal\":\"...\",\"oldVal\":{\"axes\":{\"x\":{\"key\":\"x\",\"type\":\"date\"},\"y\":{\"type\":\"linear\",\"ticks\":5,\"innerTicks\":true,\"grid\":true}},\"series\":[{\"y\":\"value\",\"color\":\"steelblue\",\"thickness\":\"1px\",\"type\":\"area\",\"striped\":true,\"label\":\"Pouet\",\"axis\":\"y\",\"dotSize\":2,\"id\":\"series_0\"}],\"lineMode\":\"linear\",\"tension\":0.7,\"tooltip\":{\"mode\":\"scrubber\"},\"drawLegend\":false,\"drawDots\":false,\"hideOverflow\":false,\"columnsHGap\":5,\"stacks\":[],\"margin\":{\"top\":20,\"right\":50,\"bottom\":60,\"left\":50,\"width\":703,\"height\":650},\"toggle\":true}}],[{\"msg\":\"options\",\"newVal\":\"...\",\"oldVal\":{\"axes\":{\"x\":{\"key\":\"x\",\"type\":\"date\"},\"y\":{\"type\":\"linear\",\"ticks\":5,\"innerTicks\":true,\"grid\":true}},\"series\":[{\"y\":\"value\",\"color\":\"steelblue\",\"thickness\":\"1px\",\"type\":\"area\",\"striped\":true,\"label\":\"Pouet\",\"axis\":\"y\",\"dotSize\":2,\"id\":\"series_0\"}],\"lineMode\":\"linear\",\"tension\":0.7,\"tooltip\":{\"mode\":\"scrubber\"},\"drawLegend\":false,\"drawDots\":false,\"hideOverflow\":false,\"columnsHGap\":5,\"stacks\":[],\"margin\":{\"top\":20,\"right\":50,\"bottom\":60,\"left\":50,\"width\":703,\"height\":675},\"toggle\":true}}],[{\"msg\":\"options\",\"newVal\":\"...\",\"oldVal\":{\"axes\":{\"x\":{\"key\":\"x\",\"type\":\"date\"},\"y\":{\"type\":\"linear\",\"ticks\":5,\"innerTicks\":true,\"grid\":true}},\"series\":[{\"y\":\"value\",\"color\":\"steelblue\",\"thickness\":\"1px\",\"type\":\"area\",\"striped\":true,\"label\":\"Pouet\",\"axis\":\"y\",\"dotSize\":2,\"id\":\"series_0\"}],\"lineMode\":\"linear\",\"tension\":0.7,\"tooltip\":{\"mode\":\"scrubber\"},\"drawLegend\":false,\"drawDots\":false,\"hideOverflow\":false,\"columnsHGap\":5,\"stacks\":[],\"margin\":{\"top\":20,\"right\":50,\"bottom\":60,\"left\":50,\"width\":703,\"height\":700},\"toggle\":true}}],[{\"msg\":\"options\",\"newVal\":\"...\",\"oldVal\":{\"axes\":{\"x\":{\"key\":\"x\",\"type\":\"date\"},\"y\":{\"type\":\"linear\",\"ticks\":5,\"innerTicks\":true,\"grid\":true}},\"series\":[{\"y\":\"value\",\"color\":\"steelblue\",\"thickness\":\"1px\",\"type\":\"area\",\"striped\":true,\"label\":\"Pouet\",\"axis\":\"y\",\"dotSize\":2,\"id\":\"series_0\"}],\"lineMode\":\"linear\",\"tension\":0.7,\"tooltip\":{\"mode\":\"scrubber\"},\"drawLegend\":false,\"drawDots\":false,\"hideOverflow\":false,\"columnsHGap\":5,\"stacks\":[],\"margin\":{\"top\":20,\"right\":50,\"bottom\":60,\"left\":50,\"width\":703,\"height\":725},\"toggle\":true}}]]\r\n```\r\n\r\nAny help is welcome !"},"comment":{"url":"https://api.github.com/repos/n3-charts/line-chart/issues/comments/159228249","html_url":"https://github.com/n3-charts/line-chart/issues/378#issuecomment-159228249","issue_url":"https://api.github.com/repos/n3-charts/line-chart/issues/378","id":159228249,"user":{"login":"pihomeserver","id":3817578,"avatar_url":"https://avatars.githubusercontent.com/u/3817578?v=3","gravatar_id":"","url":"https://api.github.com/users/pihomeserver","html_url":"https://github.com/pihomeserver","followers_url":"https://api.github.com/users/pihomeserver/followers","following_url":"https://api.github.com/users/pihomeserver/following{/other_user}","gists_url":"https://api.github.com/users/pihomeserver/gists{/gist_id}","starred_url":"https://api.github.com/users/pihomeserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pihomeserver/subscriptions","organizations_url":"https://api.github.com/users/pihomeserver/orgs","repos_url":"https://api.github.com/users/pihomeserver/repos","events_url":"https://api.github.com/users/pihomeserver/events{/privacy}","received_events_url":"https://api.github.com/users/pihomeserver/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T10:52:05Z","updated_at":"2015-11-24T10:52:05Z","body":"Partially solved by #372 (no more error but resized is triggered only at the end of a css transformation)"}}