If you want simple graphs I think ChartJS one is the easiest to use, and they look very good as well! http://www.chartjs.org/
Thanks for the reply.
Yes, I did take a look at ChartJS, xCharts, MorrisJS and a few others that are very nice and render client-side.
Like I mentioned previously, the other requirement is to generate them on the server and render them as images so I can use them in the application UI as well as embed them in emails.
var imageData = canvas.toDataURL('image/png');
You can then post this data to your server using AJAX, it will just return a base64 encoded PNG. More on this here: http://motyar.blogspot.nl/2010/04/save-html5-canvas-data-as-im...
Hope that helps you further!
Thanks for further details, though I am not sure if that's the best solution to the problem.
What would be nice is to have the graph rendered on the server because,
Please correct me if I am wrong in understanding your suggestion.
Also, I see a couple of charting libraries (may be there are more) that do render on the server side
Can someone who has experience with these (or other libraries) kindly share...thanks.
What about: https://developers.google.com/chart/
Thanks for your response.
After trying a few of the libraries, I am getting ready to use pChart as the way for creating charts on the server.
I have placed the 3 class files under app/libraries and included the folder in composer.json. But when I run it, I get an error saying "imageftbbox(): Could not find/open font".
Assuming that the pChart library could not access the font files, where should I place the font files that come with the pChart component?
My preferred way of integrating charts is by using HighCharts (http://www.highcharts.com). They have a lot of options and very easy to use. These charts can be downloaded in png/ jpg formats.
I have used HighCharts with Laravel and they have worked amazingly well for me.
Thanks for the suggestion.
Yes, HighCharts is definitely better; but the licensing cost is currently too steep for my client, so exploring pChart.
I have finally found a resolution (using pCharts) to this issue and graphs in laravel are being piloted right now with users.
Thanks for all the responses.
Just out of curiosity what was your solution. I'm getting the same error.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.