Попробуйте следующий код:
В контроллере Laravel:
$pdf = PDF::loadView('finance.remainingFee', compact('fee', 'time'));
$pdf->setPaper('a4' , 'portrait');
return $pdf->output();
И в файле Vue:
axios.get(APP_URL + `api/finance/remainingStudentFee/${fee_id}`, {responseType: 'blob'}).then(response => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'remaining_fee.pdf'); //or any other extension
document.body.appendChild(link);
link.click();
})
.catch(error => {
console.log(error);
})
Существует пример в нижней части http://flot.googlecode.com/svn/trunk/API.txt, который делает просто это. Что-то как:
var plot = $.plot(placeholder, data, options)
var series = plot.getData();
for (var i = 0; i < series.length; ++i)
alert(series[i].color);