Export Google Chart in PDF Using Laravel Snappy Package

preview_player
Показать описание
In this tutorial, you will learn how you can export Google charts into PDF files in #Laravel. For that, we will use "barryvdh/laravel-snappy" PDF package.

𝐄𝐱𝐩𝐨𝐫𝐭 𝐏𝐃𝐅 𝐢𝐧 𝐋𝐚𝐫𝐚𝐯𝐞𝐥:

Generate PDFs in Laravel with Spatie/Browsershot

𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐒𝐧𝐚𝐩𝐩𝐲 𝐏𝐚𝐜𝐤𝐚𝐠𝐞:

#𝟏: 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐄𝐱𝐩𝐨𝐫𝐭 𝐝𝐚𝐭𝐚 𝐢𝐧 𝐄𝐱𝐜𝐞𝐥, 𝐂𝐒𝐕 & 𝐦𝐮𝐥𝐭𝐢𝐩𝐥𝐞 𝐬𝐡𝐞𝐞𝐭 𝐞𝐱𝐩𝐨𝐫𝐭

#𝟐: 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐄𝐱𝐜𝐞𝐥 𝐈𝐦𝐩𝐨𝐫𝐭 𝐭𝐨 𝐃𝐚𝐭𝐚𝐛𝐚𝐬𝐞 𝐰𝐢𝐭𝐡 𝐄𝐫𝐫𝐨𝐫𝐬 𝐚𝐧𝐝 𝐕𝐚𝐥𝐢𝐝𝐚𝐭𝐢𝐨𝐧 𝐇𝐚𝐧𝐝𝐥𝐢𝐧𝐠

Also, follow us on:
Рекомендации по теме
Комментарии
Автор

Generate PDFs in Laravel with Spatie/Browsershot

QiroLab
Автор

why I'm having an error. " Failed to load PDF document. ". I follow all the steps but it doesn't work

shirah
Автор

I followed all the steps, but even so the graph did not render when exporting, would the jsapi library have changed? since when entering I am redirected to loader.js

juangonzalez
Автор

It's not working in windows
Can you please help me via video

harshbhagt
Автор

Thanks for the tutorial :)
Try to do the same with Bar graph type but in the pdf I get a message "'undefined' is not afunction"

<html>
<head>
<script type="text/javascript">

// google.charts.load('current', {'packages':['corechart', 'bar']});
//

function init(){
google.load('visualization', '1.1', {
packages: ['corechart', 'bar'],
callback: 'drawStuff'
});
}

function drawStuff() {

var data =
['Galaxy', 'Distance', 'Brightness'],
['Canis Major Dwarf', 8000, 23.3],
['Sagittarius Dwarf', 24000, 4.5],
['Ursa Major II Dwarf', 30000, 14.3],
['Lg. Magellanic Cloud', 50000, 0.9],
['Bootes I', 60000, 13.1]
]);

var materialOptions = {
width: 900,
chart: {
title: 'Nearby galaxies',
subtitle: 'distance on the left, brightness on the right'
},
series: {
0: { axis: 'distance' }, // Bind series 0 to an axis named 'distance'.
1: { axis: 'brightness' } // Bind series 1 to an axis named 'brightness'.
},
axes: {
y: {
distance: {label: 'parsecs'}, // Left y-axis.
brightness: {side: 'right', label: 'apparent magnitude'} // Right y-axis.
}
}
};

var materialChart = new
materialChart.draw(data,

};
</script>
</head>
<body onload="init()">
<div id="chart_div" style="width: 500px; height: 500px;"></div>
</body>
</html>






Any suggestion?

juancarloshuamangrados
Автор

anyone if he solve this i will give hime 30$

behappey
Автор

why I'm having an error. " Failed to load PDF document. ". I follow all the steps but it doesn't work

behappey