Home forums Using CanvasJS Generating pngs of charts on cron job

This topic contains 1 reply, has 2 voices, and was last updated by  Indranil Deo 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25463

    Hi, I have been looking through CanvasJS and I really like how it looks and functions and would serve most of my needs. However, besides generating charts and graphs to the end user through the website, I also have a cron job written in PHP that crunches database input every few hours, and from that I would like to generate static pngs of charts (mostly line graphs). I’m using a run-of-the-mill jquery website and from how I see it, I can’t think of a way that this would be possible. Am I missing something simple / obvious that will allow me to do it, or is canvasjs really not suited for this?

    #25487

    @jpawl1982,

    You can save the chart as image on the server with the help of headless browser like PhantomJS.

    Please take a look at this sample PhantomJS project, that captures the chart image from web page and saves it to a particular location. Please refer to instructions.txt file for setup instruction.

    ___________
    Indranil Deo
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.