amcharts / export

Apache License 2.0
56 stars 33 forks source link

Printing wide charts causes cropping #3

Closed marpstar closed 9 years ago

marpstar commented 9 years ago

We're trying to set up Print Export for a serial chart. Seems that the chart is not resized before print, which causes charts to be cropped.

Is AmCharts assuming that we want to print in landscape? It seems that our charts are always fitting in landscape.

We followed directions at http://www.amcharts.com/tutorials/resizing-chart-for-print/, but that doesn't seem to have an effect for AmCharts 3.14

We noticed in export.js that the chart is added to the page with 100% width. Could this be a customizable option, like PDF export, to fit a particular page size?

maertz commented 9 years ago

unfortunately the print events are not very stable across browsers, some might call them, others don't. Sadly it's not possible to pass any options to the native print method but you can change it within the print modal which pops up from the browser or define a default through CSS like following:

<style type="text/css" media="print">
  @page { size: landscape; }
</style>