You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chart.js and JavaScript doesn't come with a Laravel like number_format built in. You need a tool like Numeral.js or to write a custom function to format the number in the way that you want.
Thank you for nice plugin. I have problem about changing y axis label into number_format(). can you help to solve this? this is my code
$chartjs2 = app()->chartjs ->name('Payment') ->type('line') ->size(['width' => 400, 'height' => 200]) ->labels(["", $this_month]) ->datasets([ [ "label" => "Payment This Month", 'backgroundColor' => "rgba(1, 212, 1, 0.31)", 'borderColor' => "rgba(38, 185, 154, 0.7)", "pointBorderColor" => "rgba(38, 185, 154, 0.7)", "pointBackgroundColor" => "rgba(38, 185, 154, 0.7)", "pointHoverBackgroundColor" => "#fff", "pointHoverBorderColor" => "rgba(220,220,220,1)", 'data' => ["", $total], ], ]) ->optionsRaw([ 'scales'=>[ 'yAxes'=>[ 'ticks'=>[ 'beginAtZero' => true ], ], ], ]);
The text was updated successfully, but these errors were encountered: