Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing chart #16

Open
salchee opened this issue Jun 13, 2016 · 4 comments
Open

Printing chart #16

salchee opened this issue Jun 13, 2016 · 4 comments

Comments

@salchee
Copy link

salchee commented Jun 13, 2016

Hello. There is such an issue with those charts.
It's shown in div very well but printing is impossible. Because instead of printing whole chart, it just prints the are that fits the page and no more.(just a single page is printed)

@miguelhrocha
Copy link

You need to create a new view with the svg, there you need to use html2canvas to print the content of the div in the new window with the following code:
html2canvas(elem,
{
width: elem.find("svg").width(),
height: elem.find("svg").height(),
onrendered: function (canvas) {
window.open(canvas.toDataURL());
}
});

@sean1093
Copy link

Hello, I try to use html2canvas to export chart. It can export image successfully but something strange on my chart. For example, I use css class to change node to circle, but the export image looks strange. Is there any idea? Thanks

@bryannbarbosa
Copy link

You need to create a new view with the svg, there you need to use html2canvas to print the content of the div in the new window with the following code:
html2canvas(elem,
{
width: elem.find("svg").width(),
height: elem.find("svg").height(),
onrendered: function (canvas) {
window.open(canvas.toDataURL());
}
});

Can you show an example working?

@snowy2651
Copy link

how can i reduce the size of the chart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants