Generate PDF Charts with ChartJS in Rails 6

23-Sep-2019 3016
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.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle