uakhan
8/10/2016 - 3:22 AM

Reports

/* before iniliatinzg highcharts */

    Highcharts.setOptions({ // Apply to all charts
        chart: {
            events: {
                beforePrint: function () {
                    this.oldhasUserSize = this.hasUserSize;
                    this.resetParams = [this.chartWidth, this.chartHeight, false];
                    this.setSize(600, 400, false);
                },
                afterPrint: function () {
                    this.setSize.apply(this, this.resetParams);
                    this.hasUserSize = this.oldhasUserSize;
                }
            }
        }
    });




/* after initilizing highcharts - (make sure all the instances are added) */

    var printUpdate = function () {
        $('#chart_example').highcharts().reflow();
        $('#chart_example_2').highcharts().reflow();
    };

    if (window.matchMedia) {
        var mediaQueryList = window.matchMedia('print');
        mediaQueryList.addListener(function (mql) {
            printUpdate();
        });
    }



/* css, goes between @media print { } */

   .container.main_wrap {
      padding: 0;
   }

    .col_content {
      background: none;
      padding: 0;
      padding-top: 20px;
    }