Im using highcharts to display some results, but i need to save the chart as an jpg image into the project folder to email it.
There is a way to save the image without involve the "download" of the browser, just save it to a destinated folder.
Thanks.
If you create your own export server like what is described here (I use the Java + phantomJS setup). You can then send via the command line the json to build the chart and the output type (jpeg, pdf, etc) and then you can redirect this output to a folder of your choice. You cannot do this from the web automagically as the code does not know your path to the folder you want to store the image in. For that see here.
This is absolutely possible. The source code for the server-side export processing is available here:
https://github.com/highslide-software/highcharts.com/blob/master/exporting-server/php/php-batik/index.php
It's essentially getting a java program called Batik to stream out a PNG, JPG or PDF version of the file that you submitted. You could very easily modify that PHP code to save the batik output to a local file on the server rather than streaming it back to the user.
More info on exactly how the server-side exporting works is here:
http://www.highcharts.com/docs/export-module/export-module-overview
Hope this helps! Enjoy!