#### Category : charts

I worked on laravel charts to display my data but i never find a way to add a parameter inside the query itself. Is there any solution to this? My current query public function handler(Request $request): Chartisan { ->select(DB::raw(‘COUNT(e.id)’)) ->rightJoin(‘test_cases as c’,’e.case_id’,’=’,’c.id’) ->rightJoin(‘test_suites as s’,’c.suite_id’,’=’,’s.id’) ->rightJoin(‘build_versions as b’,’e.build_id’,’=’,’b.id’) ->rightJoin(‘configuration as f’,’f.id’,’=’,’e.finalconfig_id’) ->rightJoin(‘baseconfig_configuration as bc’,’bc.config_id’,’=’,’f.id’) ->rightJoin(‘base_config .. Read more I want to show each month’s registered student count in the line chart. I got the result from the query but I can’t understand how to pass the value in the line chart js file. Please help to fix this issue. I attached the codes and the screenshots for my output. I want to pass .. Read more I want to use Google Charts API in generating my graphs. I was able to generate it successfully but the case is, the generation of the charts should be on the server-side, not the client-side. I am using Laravel. Here is the sample code of the charts. Sourc.. Read more I am using Larapex charts for my laravel project but I cannot make the chart render when using a variable that contains my values retrieved from the database.$userLogins = User::select(DB::raw("COUNT(*) as count")) ->whereYear(‘last_login_at’, date(‘Y’)) ->groupBy(DB::raw("Month(last_login_at)")) ->pluck(‘count’); The variable above retrives following values: [1,1,3,1,1,1,1] Which I then try to place within the chart $chart = .. Read more I’m using Laravel and I want to pass variable to external js file here is controller code : public function reports() {$phone = Product::where(‘type’,’phone’)->where(‘year’,’2018′)->get(); $phoneCount =count($phone); $laptop = Product::where(‘type’,’laptop’)->where(‘year’,’2018′)->get();$laptopCount =count($laptop); } return view(‘report’, [‘phone’ =>$phoneCount,’laptop’=>$laptopCount ]); and here is external chart.js code but its not work data: { labels: ["phone","laptop"], datasets: [ .. Read more i have a laravel chart make with Chartisan, i need to set the y axes scale. Now is 0, 10, 20, 30 etc but i want 1, 2, 3, 4. This is my javascript code const chart = new Chartisan({ el: ‘#chart’, url: "@chart(‘element_chart’)" + "?idelement="+idelement, hooks: new ChartisanHooks() .colors([‘#ea9f77’]) .datasets(‘line’) .tooltip() .axis(true) }); And .. Read more I have a problem With using charts In laravel. I tried like bellow but I did not understand why my code does not work. I really confused, it works if I add one query for arr and one for arr2 inside loop, but if I add more queries it not work. if anyone knows please .. Read more I have been able to set the library and display the sample chart successfully using this: return Chartisan::build() ->labels([‘First’, ‘Second’, ‘Third’]) ->dataset(‘Sample’, [1, 2, 3]) ->dataset(‘Sample 2′, [3, 2, 1]); I tried setting up the chart with data from my database but I couldn’t. I noticed that all helpers are not accessible from the BaseChart .. Read more I was asked to make a graph where I should extract the names, along with the amount it has per year. The way I did it was just to bring the total and the year for each portal name.$portalInmobiliario = Ticket::selectRaw(‘year(created_at) as anio, count(id) as total’)->where(‘source_id’,1)->groupBy(‘anio’)->get(); $tocToc = Ticket::selectRaw(‘year(created_at) as anio, count(id) as total’)->where(‘source_id’,2)->groupBy(‘anio’)->get(); .. Read more I followed the guide on https://charts.erik.cat/guide/ to install Chartisan with echarts in my Laravel 7.4 framework. Everything works fine and I receive a chart. The chart is triggered with this handler function: public function handler(Request$request): Chartisan { return Chartisan::build() ->labels([‘First’, ‘Second’, ‘Third’]) ->dataset(‘Sample’, [1, 2, 3]) ->dataset(‘Sample 2’, [3, 2, 1]); } The dataset ..

I am following this guide: https://github.com/asantibanez/livewire-charts after installing the necessary dependencies. In my laravel project i imported: livewire -> dashboard view -> dashboard.blade.php in routes/web.php I put the following code: Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/’, [Dashboard::class])->name(‘livewire.dashboard’); but I get: Sourc..

I have a table "echatillon_de_commande" public $table = ‘order_tab’; public$fillable = [‘departement’,’pat_nom’,’pat_prenom’,’pat_email’,’pat_telephone1′,’pat_rue1′,’detail_adresse’,’pat_postal’,’pat_ville’,’pat_pays’, ‘produits_detail’,’referance’]; and I wish to have the months of commands and the number of commands placed per month. I can display the result on this view @foreach($commandes as$Echantillon_demande) <div> {{ date(‘d-M-Y’, strtotime($Echantillon_demande->created_at)) }} </div> @endforeach and pass its values in this .. Read more I installed Laravel v7 Charts and created a FieldChart <?php declare(strict_types = 1); namespace AppCharts; use ChartisanPHPChartisan; use ConsoleTVsChartsBaseChart; use IlluminateHttpRequest; class FieldChart extends BaseChart { public function handler(Request$request): Chartisan { return Chartisan::build() ->labels([‘First’, ‘Second’, ‘Third’]) ->dataset(‘Sample’, [1, 2, 3]) ->dataset(‘Sample 2’, [3, 2, 1]); } } I want to use this FiledChart class ..

I am trying to figure out In a Laravel blade file how to open a link when you click on one of the bars on a bar chart I am working on I want it so that when I click on one the bars, it will open a route based on the bar I open ..

I’m trying to implement a chart in a webpage (laravel) using laravel charts liberary (version 6 i can’t use newer version because of php version). Looks not bad but i would like to display values inside blocks, and i don’t find option wich do the job. enter image description here enter image description here Source: ..

I want a dynamic color on my chart. I use a imported css file with some identity colors. Like this: :root { –brand-color: {{\$color}}; } I am using the AmChart World chart as visualisation but the a4mchart.color() does not like variables. How do I make sure that it does take in variables? here my code: ..

I am trying to create a chart for my data but to no avail, I use laravel. I don’t know how to convert data to highchart accordingly. I refer to the demos to be able to understand this problem but still no results. https://www.highcharts.com/demo/line-labels enter image description here Source: Laravel Sta..

In my project I use Laravel 7.2 with ui bootstrap/vue and want to display a chart from Chart.js. I don´t want to use any plugins or modules and I prefer like to organize it by myself. I have tried to implement by this article: https://www.chartjs.org/docs/latest/getting-started/integration.html Nevertheless it shows an empty canvas element. This is my ..

I have already asked this on this page stackoverflow.com/questions/60200187, and try to follow the answer and it’s working. But when I add 3 columns, the stackbar is wrong, the stackbar doesn’t match with MD total, LR total and LB total. As shown below. What I want to do is this How to fix that so ..

I have table and 5 column and one of the columns has StackBarChart in it. Basicly what i want to do is this. Is there any way to loop chart and display one for each row? I refer to this link but still didn’t work below is my code <table class=”table”> <tr> <th>Name</th> <th>Total MD</th> ..