This is a migrated thread and some comments may be shown as answers.

Is it possible to resize the chart when printing?

1 Answer 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jakob
Top achievements
Rank 1
Jakob asked on 03 Mar 2014, 02:37 PM
Hi, 

I'am evaluating hte DataViz graph and have troubles when printing the graph. Tried with the example: ../kendo/examples/dataviz/bar-charts/column.html
If I print this chart the 2 last months are truncated/not visible on the print (Google Chrome, printing with Ctrl+P)

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 05 Mar 2014, 08:41 AM
Hi,

I assume that the width of your chart is expressed in percents, as this is the default style.
Since the print media is of a different size, the chart will also print in a different size and you need to call resize() before printing.

Our colleague TJ VanToll has an excellent and detailed write up regarding pre/post print events. We can definitely use them.
But things go downhill from here. Chrome reports the original document size, not the print size. IE and Firefox try to fit the content on the page with varying success.
The only solution we have is to set the chart size in points to match that of the print media:
http://jsbin.com/kohinimi/1/edit

This seems to work in Chrome and Firefox. IE prints correctly, but flickers because of the size changes.
I hope this helps.

Regards,
T. Tsonev
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

Tags
General Discussions
Asked by
Jakob
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or