{"action":"created","issue":{"url":"https://api.github.com/repos/canvg/canvg/issues/518","repository_url":"https://api.github.com/repos/canvg/canvg","labels_url":"https://api.github.com/repos/canvg/canvg/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/canvg/canvg/issues/518/comments","events_url":"https://api.github.com/repos/canvg/canvg/issues/518/events","html_url":"https://github.com/canvg/canvg/issues/518","id":208132309,"number":518,"title":"Uncaught TypeError: Cannot read property 'width' of undefined","user":{"login":"Gerarduu","id":15627051,"avatar_url":"https://avatars1.githubusercontent.com/u/15627051?v=3","gravatar_id":"","url":"https://api.github.com/users/Gerarduu","html_url":"https://github.com/Gerarduu","followers_url":"https://api.github.com/users/Gerarduu/followers","following_url":"https://api.github.com/users/Gerarduu/following{/other_user}","gists_url":"https://api.github.com/users/Gerarduu/gists{/gist_id}","starred_url":"https://api.github.com/users/Gerarduu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gerarduu/subscriptions","organizations_url":"https://api.github.com/users/Gerarduu/orgs","repos_url":"https://api.github.com/users/Gerarduu/repos","events_url":"https://api.github.com/users/Gerarduu/events{/privacy}","received_events_url":"https://api.github.com/users/Gerarduu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-16T14:12:45Z","updated_at":"2017-04-07T05:48:39Z","closed_at":null,"body":"Hello I want to print a Chart, but it throws me this error: \r\n\r\nUncaught TypeError: Cannot read property 'width' of undefined.\r\n\r\nHere is the svg code:\r\n\r\n`<svg class=\"v-m-root\" style=\"left: 0px; top: 0px; height: 100%; width: 100%; display: block; cursor: default;\" width=\"100%\" height=\"100%\"><defs></defs>\r\n\t\t<g class=\"v-m-action-layer-group\"></g>\r\n\t\t<g class=\"v-m-decoration-layer-group\"></g>\r\n\t\t<g class=\"v-m-background\"></g><g class=\"v-m-title\" transform=\"translate(38, 25)\"></g>\r\n\t\t<g class=\"v-m-legendGroup\" transform=\"translate(432, 25)\">\r\n\t\t<g class=\"v-m-legend\"><rect class=\"v-bound\" width=\"0\" height=\"0\" visibility=\"hidden\"></rect></g></g>\r\n\t\t<g class=\"v-m-main\" transform=\"translate(5, 25)\"><g class=\"v-m-plot\" transform=\"translate(33, 0)\">\r\n\t\t\t<rect class=\"v-background-body viz-plot-background v-morphable-background\" x=\"0\" y=\"0\" width=\"394\" height=\"122\" style=\"fill:transparent\"></rect>\r\n\t\t\t<clipPath id=\"plot_main_clipPath_ee739eac-2759-4cac-bedf-862d3c80382a\">\r\n\t\t\t\t<rect y=\"-1\" width=\"395\" height=\"123\"></rect>\r\n\t\t\t</clipPath>\r\n\t\t\t<rect class=\"v-plot-bound v-bound v-zoom-plot\" width=\"394\" height=\"122\" fill=\"transparent\"></rect>\r\n\t\t\t<g clip-path=\"url(#plot_main_clipPath_ee739eac-2759-4cac-bedf-862d3c80382a)\">\r\n\t\t\t\t<g class=\"v-plot-main\" transform=\"translate(0, 0)\">\r\n\t\t\t\t<g class=\"v-datapoint-group\"><g class=\"v-stack\">\r\n\t\t\t\t<g data-id=\"0\" data-datapoint-id=\"31\" class=\"v-datapoint v-morphable-datapoint v-datapoint-default\" transform=\"translate(0, 10.166666666666666)\">\r\n\t\t\t\t\t<rect width=\"85.45403551\" height=\"20.333333333333332\" fill=\"#748cb2\" shape-rendering=\"crispEdges\">\r\n\t\t\t\t\t</rect>\r\n\t\t\t\t</g>\r\n\t\t\t</g>\r\n\t\t\t<g class=\"v-stack\">\r\n\t\t\t\t<g data-id=\"1\" data-datapoint-id=\"32\" class=\"v-datapoint v-morphable-datapoint v-datapoint-default\" transform=\"translate(0, 50.83333333333333)\">\r\n\t\t\t\t\t<rect width=\"327.58641091704004\" height=\"20.333333333333332\" fill=\"#748cb2\" shape-rendering=\"crispEdges\">\r\n\t\t\t\t\t</rect>\t\r\n\t\t\t\t</g>\r\n\t\t\t</g>\r\n\t\t\t<g class=\"v-stack\">\r\n\t\t\t\t<g data-id=\"2\" data-datapoint-id=\"33\" class=\"v-datapoint v-morphable-datapoint v-datapoint-default\" transform=\"translate(0, 91.5)\">\r\n\t\t\t\t\t<rect width=\"374.06536994256\" height=\"20.333333333333336\" fill=\"#748cb2\" shape-rendering=\"crispEdges\"></rect>\r\n\t\t\t\t</g>\r\n\t\t\t</g>\r\n\t\t</g>\r\n\t\t<g class=\"v-datalabel-group\">\r\n\t\t<g data-datapoint-id=\"31\" class=\"v-datalabel v-morphable-label\" fill=\"#333333\" font-family=\"'Open Sans', Arial, Helvetica, sans-serif\" font-size=\"12px\" font-weight=\"normal\" font-style=\"normal\" cssString=\"fill:#333333;font-family:'Open Sans', Arial, Helvetica, sans-serif;font-size:12px;font-weight:normal;font-style:normal;\" transform=\"translate(35.79732894897461,24.83333396911621)\"><text>54</text></g><g data-datapoint-id=\"32\" class=\"v-datalabel v-morphable-label\" fill=\"#333333\" font-family=\"'Open Sans', Arial, Helvetica, sans-serif\" font-size=\"12px\" font-weight=\"normal\" font-style=\"normal\" cssString=\"fill:#333333;font-family:'Open Sans', Arial, Helvetica, sans-serif;font-size:12px;font-weight:normal;font-style:normal;\" transform=\"translate(153.504150390625,65.49999904632568)\"><text>208</text></g><g data-datapoint-id=\"33\" class=\"v-datalabel v-morphable-label\" fill=\"#333333\" font-family=\"'Open Sans', Arial, Helvetica, sans-serif\" font-size=\"12px\" font-weight=\"normal\" font-style=\"normal\" cssString=\"fill:#333333;font-family:'Open Sans', Arial, Helvetica, sans-serif;font-size:12px;font-weight:normal;font-style:normal;\" transform=\"translate(176.74362182617188,106.1666669845581)\"><text>237</text></g></g></g></g><g class=\"v-referenceline-group\" clip-path=\"url(#plot_main_clipPath_ee739eac-2759-4cac-bedf-862d3c80382a)\"></g></g><g class=\"v-m-categoryAxis v-m-yAxis\" transform=\"translate(0, 0)\"><rect class=\"v-bound\" width=\"33\" height=\"122\" fill=\"transparent\"></rect><g class=\"v-axis\"><g class=\"v-m-axisTitle\" transform=\"translate(0,0)\"></g><g class=\"v-m-axisBody\" transform=\"translate(0,0)\" clip-path=\"url(#clip-path-b34a9dc9-c29d-499b-a710-62bc04c29bf6)\"><clipPath class=\"v-clippath\" id=\"clip-path-b34a9dc9-c29d-499b-a710-62bc04c29bf6\"><rect x=\"-1\" y=\"-1\" width=\"35\" height=\"124\"></rect></clipPath><g class=\"v-label-group\"><g class=\"v-label v-morphable-label viz-axis-label v-axis-item index_0\" fill=\"#333333\" font-size=\"12px\" font-weight=\"normal\" font-family=\"'Open Sans', Arial, Helvetica, sans-serif\" font-style=\"normal\" categorylabel-id=\"0\" transform=\"translate(0,0)\"><rect class=\"viz-axis-label-rect\" fill=\"transparent\" x=\"1\" y=\"1\" width=\"31\" height=\"38.666666666666664\"></rect><g class=\"v-axis-label-wrapper\"><text x=\"27\" y=\"24.03333333333333\" text-anchor=\"end\">A16</text></g></g><g class=\"v-label v-morphable-label viz-axis-label v-axis-item index_0\" fill=\"#333333\" font-size=\"12px\" font-weight=\"normal\" font-family=\"'Open Sans', Arial, Helvetica, sans-serif\" font-style=\"normal\" categorylabel-id=\"1\" transform=\"translate(0,40.66666667)\"><rect class=\"viz-axis-label-rect\" fill=\"transparent\" x=\"1\" y=\"1\" width=\"31\" height=\"38.666666666666664\"></rect><g class=\"v-axis-label-wrapper\"><text x=\"27\" y=\"24.03333333333333\" text-anchor=\"end\">B16</text></g></g><g class=\"v-label v-morphable-label viz-axis-label v-axis-item index_0\" fill=\"#333333\" font-size=\"12px\" font-weight=\"normal\" font-family=\"'Open Sans', Arial, Helvetica, sans-serif\" font-style=\"normal\" categorylabel-id=\"2\" transform=\"translate(0,81.33333333)\"><rect class=\"viz-axis-label-rect\" fill=\"transparent\" x=\"1\" y=\"1\" width=\"31\" height=\"38.66666666666667\"></rect><g class=\"v-axis-label-wrapper\"><text x=\"27\" y=\"24.033333333333335\" text-anchor=\"end\">A15</text></g></g></g></g></g></g><g class=\"v-m-valueAxis v-m-xAxis\" transform=\"translate(33, 122)\"><rect class=\"v-bound\" width=\"394\" height=\"0\" fill=\"transparent\"></rect><g class=\"v-axis\"><g class=\"v-m-axisScrollbar\" transform=\"translate(0,0)\"></g><g class=\"v-m-axisTitle\" transform=\"translate(0,0)\"></g><g class=\"v-m-axisBody\" transform=\"translate(0,0)\"><rect class=\"v-bound\" width=\"394\" height=\"0\" fill=\"transparent\"></rect></g></g></g><g class=\"v-m-scrollbar\" transform=\"translate(427, 0)\"></g></g></svg>`\r\n\r\nI'm using html2canvas and canvg. Can anyone tell whats happening?\r\n\r\nKind regards,\r\n\r\nGerard Riera Puig."},"comment":{"url":"https://api.github.com/repos/canvg/canvg/issues/comments/292447235","html_url":"https://github.com/canvg/canvg/issues/518#issuecomment-292447235","issue_url":"https://api.github.com/repos/canvg/canvg/issues/518","id":292447235,"user":{"login":"Minxine-Yao","id":22310509,"avatar_url":"https://avatars3.githubusercontent.com/u/22310509?v=3","gravatar_id":"","url":"https://api.github.com/users/Minxine-Yao","html_url":"https://github.com/Minxine-Yao","followers_url":"https://api.github.com/users/Minxine-Yao/followers","following_url":"https://api.github.com/users/Minxine-Yao/following{/other_user}","gists_url":"https://api.github.com/users/Minxine-Yao/gists{/gist_id}","starred_url":"https://api.github.com/users/Minxine-Yao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minxine-Yao/subscriptions","organizations_url":"https://api.github.com/users/Minxine-Yao/orgs","repos_url":"https://api.github.com/users/Minxine-Yao/repos","events_url":"https://api.github.com/users/Minxine-Yao/events{/privacy}","received_events_url":"https://api.github.com/users/Minxine-Yao/received_events","type":"User","site_admin":false},"created_at":"2017-04-07T05:48:39Z","updated_at":"2017-04-07T05:48:39Z","body":"You might set the attributes `width` and `height` of the `svg` element an accurate number instead of percentage."}}
{"actor":{"display_login":"Minxine-Yao"}}