Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. $graficos['vendas'] = app()->chartjs
  2. ->name('lineChartTest')
  3. ->type('line')
  4. ->size(['width' => 400, 'height' => 200])
  5. ->labels(['January', 'February', 'March', 'April', 'May', 'June', 'July'])
  6. ->datasets([
  7. [
  8. "label" => "My First dataset",
  9. 'backgroundColor' => "rgba(38, 185, 154, 0.31)",
  10. 'borderColor' => "rgba(38, 185, 154, 0.7)",
  11. "pointBorderColor" => "rgba(38, 185, 154, 0.7)",
  12. "pointBackgroundColor" => "rgba(38, 185, 154, 0.7)",
  13. "pointHoverBackgroundColor" => "#fff",
  14. "pointHoverBorderColor" => "rgba(220,220,220,1)",
  15. 'data' => [65, 59, 80, 81, 56, 55, 40],
  16. ],
  17. [
  18. "label" => "My Second dataset",
  19. 'backgroundColor' => "rgba(38, 185, 154, 0.31)",
  20. 'borderColor' => "rgba(38, 185, 154, 0.7)",
  21. "pointBorderColor" => "rgba(38, 185, 154, 0.7)",
  22. "pointBackgroundColor" => "rgba(38, 185, 154, 0.7)",
  23. "pointHoverBackgroundColor" => "#fff",
  24. "pointHoverBorderColor" => "rgba(220,220,220,1)",
  25. 'data' => [12, 33, 44, 44, 55, 23, 40],
  26. ]
  27. ])
  28. ->options([]);
  29.  
  30. $graficos['financas'] = app()->chartjs
  31. ->name('pieChartTest')
  32. ->type('pie')
  33. ->size(['width' => 400, 'height' => 200])
  34. ->labels(['Label x', 'Label y'])
  35. ->datasets([
  36. [
  37. 'backgroundColor' => ['#FF6384', '#36A2EB'],
  38. 'hoverBackgroundColor' => ['#FF6384', '#36A2EB'],
  39. 'data' => [69, 59]
  40. ]
  41. ])
  42. ->options([]);
  43.  
  44. $pagina['titulo_pagina'] = "Dashboard";
  45. return view('admin/dashboard/dashboard', compact('graficos', 'pagina'));
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement