Generate PDF Charts with ChartJS in Rails 6

It gets messier when you try to render charts and graphs on PDF, as even widely used gem like wickedPDF doesn’t properly support HTML canvas element without applying patches, and becomes headache to upgrade in long run. Today I’ll tell you a quick way to build rich PDF charts in Rails using Google’s headless engine Puppeteer and chartJS library (or highcharts etc). There is a ruby wrapper of it with the name of Dhalang. Which is quite easy to setup.
Generate PDF Charts with ChartJS in Rails 6 #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles