-2

Is there a way to create a graph after receiving data from the server and can be saved as a jpg file? ex: creating a chart with the data received from the server and transform the chart to a jpg file

(I've checked highcharts.com, but when I right clicked on it's products I cannot download a jpg image. So I assume highcharts only creates a graph that cannot be downloaded as a jpg file)

kmes40505
  • 65
  • 8

1 Answers1

1

Depending on your situation, you may not need HTML nor JavaScript at all.

If the server is a Unix server you could generate the chart on the server using a very proven tool like GNU Plot which can output to various image formats. You could then present the user of your application with this image.

I even believe there is a GNU Plot version for Windows based servers as well.

Or, if you insist in drawing the chart with JavaScript, you could use famous libraries like Flot or Protovis to draw charts dynamically, client side and then use a tool like canvas2image to actually save the generated canvas chart or use the suggestion made in this answer.

Community
  • 1
  • 1
Timusan
  • 3,255
  • 1
  • 22
  • 27