Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The PHP script[1] is just a simple proxy to pass the SVG content to a well-regarded Apache Batik toolkit which then does the actual SVG->PNG conversion. I suspect PHP was chosen because of it is more readily available than any other backend tech among Highcharts clients.

Flot is a canvas-based library, so it can rely on modern browsers to rasterize canvas drawings to an image within the browser. Rasterizing SVG into an image directly within the browser is technically possible, but not supported across a wide range of browsers, so sending the SVG to the backend for conversion is a valid and very common technique.

[1] https://github.com/highslide-software/highcharts.com/blob/ma...



God forbid someone could get javascript environment running on a server.

Granted, it's not as lowest-common-denominator as php, but I personally ain't touching that stuff.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: