radi8
Posts: 25
Joined: Wed Oct 31, 2012 3:15 pm

GANTT: Formatting the Export Views

My gantt charts are rather large and when they are printed, drop the majority of the data (truncates it).

I need to scale the image (make it smaller) and set the export orientation to Landscape (print view, image, and pdf). I searched everywhere but cannot find a descent solution.

fiddle: http://jsfiddle.net/radi8/hf0rge8t/

I hope this is the last issue I have on this.
radi8
Posts: 25
Joined: Wed Oct 31, 2012 3:15 pm

Re: GANTT: Formatting the Export Views

This appears to work:

Code: Select all

Highcharts.setOptions({
            time: {timezone: 'America/New_York'},
            exporting:{
               
                /*
                	Begin export formatting issue fix
                	Adding in the Chart Options height, width, Scale and FontSize fixes the exporting issue
                */
                scale: 6,
                chartOptions: {
                    chart: {
                        width: 1700,
                        height: 1200
                    },
                    style: {fontSize: '14px'}
                },
                /*
                	End export formatting issue fix
                */
                csv: {
                    decimalPoint: '.',
                    dateFormat: '%Y-%m-%d %H:%M %p'
                },
                buttons: {
                    contextButton: {
                        menuItems: [
                            'viewFullscreen',
                            'separator',
                            'downloadPNG',
                            'downloadPDF',
                            'downloadCSV'
                        ]
                    }
                }
            }
        });
bastss
Site Admin
Posts: 1192
Joined: Wed Oct 17, 2018 10:59 am

Re: GANTT: Formatting the Export Views

Hello radi8,

Thank you for sharing your solution for our community!

Kind regards!
Sebastian Wędzel,
Highcharts Developer
ffi
Posts: 1
Joined: Tue Nov 23, 2021 12:42 pm

Re: GANTT: Formatting the Export Views

Hi,

New to Highcharts and having a similar issue. I'm dealing with an existing widget that generates an image like this.
The Export to Excel/CSV functions, however, only export 2 columns: one with the timestamps (X axis), and one with the project name (Y axis). On their own they are pretty useless: what I'd like to do is to also export the status column. However I haven't found the documentation on how to achieve that.
By the way, shouldn't it be the case that the "status" column of any Gantt chart is exported by default?

Thanks in advance
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: GANTT: Formatting the Export Views

Hi,

Welcome to our forum and thanks for contacting us with your question!

It is hard to tell you what is not working and what could be done without taking look at your code.
Also, I'm not sure if I understood correctly what exactly is exporting and what is not.

Could you please reproduce the issue in an online editor that I could work on? You can start here: https://jsfiddle.net/BlackLabel/hsjt45Lz/

Regards!
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Usage”