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 can i add units to my chart help me =D #51

Closed khelilo7 closed 7 years ago

khelilo7 commented 7 years ago

i tried this $options['scales']['yAxes']['scaleLabel']['display']=true; $options['scales']['yAxes']['scaleLabel']['labelString']="Data"; $chartjs = app()->chartjs ->name('pieChartUser') ->type('pie') ->size(['width' => 400, 'height' => 200]) ->options($options);

fxcosta commented 7 years ago

@khelilo7 Can u see if with doc fixed, it help you? b2b1560

khelilo7 commented 7 years ago

i tried from docs $chart->optionsRaw("{ legend: { display:false }, scales: { yAxes: [{ scaleLabel: { display:true, labelString:"Data"

            }  
            }]
        }
    }");

same issue

Steven-Rose commented 7 years ago

I'm also having issues utilizing options. When I use the optionsRaw example from the docs I get the following 500 error: "Argument 1 passed to Fx3costa\LaravelChartJs\Builder::optionsRaw() must be an instance of Fx3costa\LaravelChartJs\string, string given, called in..." Hopefully that helps

fxcosta commented 7 years ago

Now you can pass a php array to optionsRaw: 7083c0810200d8d0f6f183bc61f3752299479e74

Sorry for delay!