laravel-charts
laravel-charts copied to clipboard
Backward compatible for non-English chart title
trafficstars
If non-English string is apply to chart title, the chart won't show anything and comes with javascript error Reproduce:
$chart_options = [
'chart_title' => '標題', //which is Chinese string
'report_type' => 'group_by_date',
'model' => 'App\Models\users',
'group_by_field' => 'update_at',
'group_by_period' => 'week',
'chart_type' => 'bar',
];
This PR will check the chart title is empty or not, then fall back to the original characters without slugify it.