davehoch
Posts: 3
Joined: Tue Sep 19, 2023 8:29 pm

highcharts-export-server and highcharts.js 9.0.1 clipping right edge of chart at 400px

Tue Sep 19, 2023 9:14 pm

Hi,

At my company, we have been successfully running highcharts-export-server with Highcharts 5.0.7 for years. I am trying to upgrade to Highcharts 9.0.1. That specific version is required. When I swap out the highcharts.js file for the newer one, all charts get cutoff at 400 pixels wide, regardless of what I pass in for chart.width. As you can see from the screenshot, the image itself is the correct width, but the chart appears to be clipped.

We are running this code on the server: https://github.com/highcharts/highchart ... ree/master
I downloaded highcharts.js 9.0.1 from here: https://github.com/highcharts/highchart ... .1/modules

Any help would be appreciated.

Thanks!

P.S. I already fixed a problem with the tickWidth defaulting to 0 instead of 1.
Screenshot 2023-09-19 at 3.04.16 PM.png
Screenshot 2023-09-19 at 3.04.16 PM.png (183.16 KiB) Viewed 70 times

jakub.s
Posts: 959
Joined: Fri Dec 16, 2022 11:45 am

Re: highcharts-export-server and highcharts.js 9.0.1 clipping right edge of chart at 400px

Wed Sep 20, 2023 6:52 am

Hi,

Thanks for the question!

Are you using the highcharts-export-server based on Java + PhantomJS?

If yes, I regret to inform you, but this package has not been updated since 2017 (and has had no real update for nearly 10 years). I don't believe it is the most optimal solution to any problem out there.

The good news is that recently we've released a beta version of the Export Server which is now based on Puppeteer (a modern headless browser library, which does not struggle with modern features like modern CSS/JS).

I encourage you to try it out, here's a short setup guide: https://github.com/highcharts/node-expo ... nformation

You should not encounter issues like the one you've mentioned in the puppeteer-based version and I'm afraid that issues like that might be common with the newest version of Highcharts + Java, PhantomJS Export Server.

Alternatively, you could try out the PhantomJS-based version (here's the repository: https://github.com/highcharts/node-export-server) which has been tested and works well for Highcharts versions < 11.

Best regards!
Jakub
Highcharts Developer

davehoch
Posts: 3
Joined: Tue Sep 19, 2023 8:29 pm

Re: highcharts-export-server and highcharts.js 9.0.1 clipping right edge of chart at 400px

Wed Sep 20, 2023 9:20 pm

Hi Jakub. Thanks for the response!

We are indeed using the highcharts-export-server based on Java + PhantomJS, and have been for many years.

We would love to move to the newer solution you mentioned, but it's a hard sell to ask my company to deploy beta software to production with known memory leaks.

Do we have any leverage as a paying client to have a developer at least look into the problem to see if there's a reasonable solution?

Thanks!

davehoch
Posts: 3
Joined: Tue Sep 19, 2023 8:29 pm

Re: highcharts-export-server and highcharts.js 9.0.1 clipping right edge of chart at 400px

Wed Sep 20, 2023 9:44 pm

I did a little more testing, and found that the problem was introduced between versions 6.2.0 and 7.0.0.

jakub.s
Posts: 959
Joined: Fri Dec 16, 2022 11:45 am

Re: highcharts-export-server and highcharts.js 9.0.1 clipping right edge of chart at 400px

Thu Sep 21, 2023 9:03 am

Hi Dave,

Thanks for sharing!

I've forwarded your question to our Export Server team and I will get back to you as soon as I get an answer.

Regards!
Jakub
Highcharts Developer

jakub.s
Posts: 959
Joined: Fri Dec 16, 2022 11:45 am

Re: highcharts-export-server and highcharts.js 9.0.1 clipping right edge of chart at 400px

Thu Sep 21, 2023 9:30 am

Hi,

Unfortunately, the Java version has been officially deprecated for 6+ years now - we do not actively maintain the repository. As I've mentioned in my previous post, the best way would be to switch to a PhantomJS+Node version (which works well for Highcharts versions < 11) or to a Puppeteer+Node version (which is in the beta stage and has 2 health issues that hopefully will be solved shortly).

If you have to stick with the Java version, that's how I would debug it:
- Highcharts version 7 changed the way styledMode works - the issue could be related to this
- does it happen if setting the width to a higher value, eg. 1200
- does it happen if changing the scaling to 0.5
- does it happen when using the highcharts-convert phantom script located in phantom/ in CLI mode (e.g. `phantomjs highcharts-convert.js -infile options1.json -outfile chart1.png -width 600 -constr Chart)
- does it happen with all file formats?

Let me know if you need any help with your decision. I'll be happy to provide you with more details about the newest versions.

Best regards!
Jakub
Highcharts Developer

Return to “Highcharts Usage”