fxcosta / laravel-chartjs

Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library
486 stars 112 forks source link

How tor write options with multi-level properly #45

Closed zihadt closed 7 years ago

zihadt commented 7 years ago

I am trying to figure out how to write optionas parameters and values properly. For example how can I write this option for chartjs using the options provided by laravel-chartjs?

options: { scales: { yAxes: [{ ticks: { beginAtZero:true } }] } }

zihadt commented 7 years ago

ok I figured that out but having difficulties implementing callback function via php array syntax. any Idea how it can be done or this functionality not implemented yet?

Damian89 commented 7 years ago

Take a look at this method and check the view, its currently not documented ;)

https://github.com/fxcosta/laravel-chartjs/blob/master/src/Builder.php#L131

fxcosta commented 7 years ago

@Damian89 I'll quote your message in the documentation. If you prefer, send a pull request with an overwrite to add the documentation. Thank you!

fxcosta commented 7 years ago

fixed ef72b11c4dcc68f0ce8a3fd0b04106a71933150c