Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
54 views

URL segment "undefined" when clicking on item in chart.js

I'm having trouble with Chart.js where clicking on a chart segment always redirects to an undefined value. I have a doughnut chart and want each segment to redirect to a specific URL based on the ...
ALDI DAIM FAUZAN's user avatar
0 votes
1 answer
72 views

Chart JS update transition - zoomed in blurry chart

I'm doing what I think is a pretty standard destroy() and recreation of a chart using Chart.js. The chart updates as expected but I see a strange zoomed-in, blurry chart during the transition. I can't ...
split19's user avatar
  • 637
0 votes
0 answers
261 views

How to use chartjs plugins in laravel filament V3 widgets?

I am trying to use the chartjs plugin chartjs-plugin-datalabels in my doughnut chart widget. I have done the steps mentioned in the this filament documentation I am using as in the below code for the ...
Angom's user avatar
  • 743
0 votes
1 answer
23 views

Line chart not showing up in Chart.js using Laravel and PHP data

Description: I'm working on a Laravel project where I'm trying to display a line chart using Chart.js. I'm fetching the data from my Laravel controller and passing it to the view, but the line chart ...
kimski's user avatar
  • 45
0 votes
0 answers
116 views

Laravel dynamic charts using chartjs

I have a website with transactions and I want to build transactions that are dynamically created with specific filters for each. I am not sure what the right approach would be to do this. I have one ...
prototrip's user avatar
0 votes
0 answers
54 views

Is there a way to use non-inline plugins with Chart.js using the ConsoleTVs/Charts package?

I am working with a Laravel application that uses Backpack and renders charts using the ConsoleTVs/Charts package. From what I've found online, there is no way to use non-inline plugins that require ...
Easton Meth's user avatar
0 votes
1 answer
99 views

How to filter collection based on key?

I have a collection which is like this: Illuminate\Support\Collection {#456 ▼ // app\Http\Controllers\UserController.php:42 #items: array:4 [▼ 0 => array:10 [▼ "to" => &...
Hola's user avatar
  • 2,233
0 votes
1 answer
469 views

How do i create stacked bar chart using ChartJs in Filament?

Good day, I need your assistance/guidance in creating a stacked bar chart using Chartjs in Laravel Filament. I have a tabled named 'Tasks' that has a relation with 'Clients' table. The fields for each ...
kgori_dev's user avatar
  • 156
0 votes
0 answers
52 views

Laravel Backpack Fusioncharts widget not working

I have a Laravel app that uses backpack and I am trying to create a chart with bars that when clicked, will redirect you to a specific CRUD page on the site. I did a little research and figured out ...
Easton Meth's user avatar
0 votes
1 answer
95 views

Using JS - how do I make a chart like this?

I've been trying to get this made using Chart.js or even ApexCherts - but haven't been able to do it. The closest this looks like is a Polar Chart, this is what I have so far: This is my code: <...
VenoM's user avatar
  • 463
0 votes
0 answers
72 views

Laravel: How to Export Dashboard data which is consist of graph Graph and Table to PDF

I am using Laravel 10, I have dashboard and few other pages that have Graph that use ChartJS. What I understand dompdf camnnot be use as it does not support Javascript. I am try to use the Browser ...
Muhammad Faiz Abdullah's user avatar
0 votes
1 answer
229 views

How to use chartjs-plugin-zoom in laravel

I am trying to use the functionality of chartjs-plugin-zoom in my laravel application but I cant't get it to work. In the blade I am loading the plugin through Cloudflare cdnjs: <script src="...
SenneVP's user avatar
  • 77
0 votes
0 answers
301 views

How to dynamic chart js with laravel inertia and vue js

I want to make this chart dynamic using Laravel and Vue.js. I want to display the data from a table based on the month and income type. I want the payments to be displayed based on the month and ...
Tabish's user avatar
  • 35
2 votes
0 answers
109 views

Update chart.js in laravel from controller

I am attempting to update my chart.JS in my view when a new date is selected from the date picker. I think I got pretty close. The date goes from my datepicker through to my controller via AJAX post: &...
LaravelScrub's user avatar
0 votes
0 answers
49 views

Chart JS not displaying bars/labels on graph

I am using Laravel 10, and Chart.JS for graphs on my site. I've got the stats loaded from the database, however, when creating the graph it shows me (https://i.sstatic.net/QT0s7.jpg) the graph lines, ...
Ethan Patchell's user avatar
0 votes
3 answers
621 views

Get a data from user table for line chart (chart.js)

Below is the image is what i am trying to achieve:- I am on Laravel and I want to get the last 30 days from the current date data from the user table based on how many new users enter a website and ...
Ronak Panchal's user avatar
1 vote
1 answer
287 views

How to dynamically render new list of charts based on a dropdown filter?

I am not trying to refresh the existing charts on the blade. Here's the scenario, each module has a list of questions, options and answers (option selected by the user). I have a dropdown to filter ...
TheLazyUnicorn's user avatar
0 votes
0 answers
32 views

Week Input Value is Not Being Passed to Controller Method in Laravel Using Ajax

<input type="week" class="week-picker" id="week_input" name="week_input" onchange="SubmitForm(event);" /> Below is ajax code: function ...
Ayesha's user avatar
  • 147
0 votes
1 answer
71 views

Chart js Tooltips for my graph is displaying all data as a group while hovering on a single bar

Why is this happen, please look at the snap below! snap my data from the server for is an arrays of 12 size as months shown on the labels ` var sales = {{ $sales }}; var profit = {{ $profit }}; var ...
zuma boy's user avatar
1 vote
1 answer
29 views

Why graphic points dont join together when there is another existing graphic line?

Hello i am working with ChartJs to make a graphic that gets its values from API using laravel. I have a problem that if i have more then 1 graphic line the other graphic dots will not connect with ...
laraCoder's user avatar
  • 271
1 vote
1 answer
71 views

Multiple labels in chart js, i want to change the order of the labels

const subLabels = { id: 'subLabels', afterDatasetsDraw(chart, args, pluginOptions) { const { ctx, chartArea: {left, right, top, bottom, width, height}} = chart; ...
Sonic's user avatar
  • 17
0 votes
1 answer
588 views

Multiple Charts in one page with Laravel & Chartjs

I'm trying to display two charts in one page. I'm expecting like 1 doughnut and 1 pie. Here's my view snippets: First Chart <div class="card-body d-flex flex-center flex-column" style=&...
specterdemara's user avatar
1 vote
0 answers
119 views

How do I edit the label and x-axis of a laravel/chart.js boxplot?

Chart.js translation for plotting on frontend side in Laravel. There is a yield of 3 months dates and their datas. How should I fit charjs that overlap and not all dates are written at the end of x? (...
Aleyn's user avatar
  • 35
0 votes
0 answers
44 views

Change chartjs data according to selected department

I have some graphs which I want to be able to change according to the selected department, but I can't make this happen. Right now I am fetching the data from a controller as follows: public function ...
Karelix Alejandra's user avatar
1 vote
0 answers
187 views

laravel group by date show 0 when no data for the charts

What I want to use this is for a chartjs line chart in dashboard. $today = today(); $dates = []; for($i=1; $i < $today->daysInMonth + 1; ++$i) { $dates[] = \Carbon\Carbon::createFromDate($today-...
Heshanmax's user avatar
  • 107
0 votes
2 answers
58 views

How can I divide values from two different arrays which are not of the same length?

I am trying to get DividendYield from a company for the last 20 years using ChartJs in laravel project. The arrays came from HTTP client API. The formula is like that :$dividendPayed / $dailyPrice * ...
webdev7's user avatar
-1 votes
2 answers
981 views

ErrorException compact(): Undefined variable: Sep - laravel 8

please help me I made a chart, but there is a problem when I want to display the data, why is it compacted? example code controller : if(Auth::user()->hasRole('Super Admin')) { $user = ...
gagaltotal666's user avatar
0 votes
2 answers
436 views

Laravel how to pass data into Chart.js?

I want to pass data into Chart.js, however nothing appear on the card. How to solve this problem adn what is the correct way to pass data into Chart.js? I cant directly put the data into the script in ...
Wesley's user avatar
  • 65
0 votes
1 answer
1k views

Not understanding why chart js wont load

Chart JS 3.9.1 Laravel 9.x There are 50 thousand questions using 20 different versions and none of them, from what I have found are helpful. I have checked the version, checked the docs, and even ...
TheWebs's user avatar
  • 12.9k
1 vote
1 answer
600 views

how to foreach datasets in chartjs laravel

I have a problem that I can't loop datasets chartjs in laravel. below is my code in model public function umur($tanggal) { return DB::table('riwayat') ->select('umur') ->...
Sukmo Abadii's user avatar
1 vote
1 answer
484 views

Laravel 8: why is sorting by date in eloquent is wrong, using Carbon

Possible duplicates: Laravel: How to order date, change the date format and group by the date? Laravel Carbon format wrong date I created a line chart using chartjs, the chart and data fetching is ...
Abdulrahman Mushref's user avatar
0 votes
1 answer
106 views

get the count of dayname Failed - Laravel 9

For my case , I have a data table contains a timestamps data call "created_at" , right now , it want to get the count of the dayname of the time stamp so ideally it will be like and I like ...
JUSTIN CHUA's user avatar
0 votes
1 answer
875 views

Is it possible to generate multiple chart in Laravel using chartjs ? If possible please give the solution

My blade file code is: @foreach ($radio_data as $data) <div style="text-align: center" class="row"> ...
Parvez Hossain's user avatar
0 votes
3 answers
1k views

How to display data by current month and display no data message if data not exists

I want to show data by current month and show 'no data to display' message if no data exists on current month. I managed to show all data ascending by date, but this time I only want it to display ...
rizkydhani's user avatar
1 vote
2 answers
331 views

How to hide/show bars differentiate by a colors and by click on labels, using chartjs bar charts?

I am using chartjs to show one month attendance data, what I want to acheive is to show each day data with different colors like Present, absent and leave. I want labels on top and by click on that ...
Noman Zahid's user avatar
0 votes
0 answers
623 views

How to get dynamic data form database to show on the line chart?

I hey a dashboard to show a line chart that contains a dynamic data from table users. My chart will show all the user, that will get according the updated_at column. Moreover, I really struggle how to ...
kato's user avatar
  • 196
0 votes
1 answer
744 views

Laravel-Backpack - How to re-render Ajax charts

I'm trying to display some AJAX loaded charts that change content when the user changes a filter without reloading the page. Followed Backpack and Laravel charts docs but I'm kinda stuck on how to re-...
Miguel Heredia's user avatar
0 votes
1 answer
2k views

Chart JS not re rendering in Laravel Livewire

Whenever there is a data change, ChartJS just doesn't re render the Chart. Here's the flow. Whenever I press a button, it fires an event and refreshes the entire chart component. I can see data is ...
PendejoTrax's user avatar
0 votes
1 answer
96 views

How to set min Value a step down of min value received from database in Y Axis in ChartJS

I am displaying a chart showing month on x and amount y from values received from database. Say X = Jan21, Feb21, March21 and So on. Y = 1000, 1500, 2000 and So on. Step automatically coming 500. Now ...
Rahul W's user avatar
  • 195
0 votes
0 answers
155 views

Show Value in Vertical Axis using chart from Min ------ Max Value in Laravel

Good Afternoon, I am trying to draw chart in Laravel. For Y Axis i need to put amount and on X Axis - Date. I get min and max value for Y Axis. So need to get intermediate value with 50 Increment. Say ...
Rahul W's user avatar
  • 195
1 vote
1 answer
1k views

Laravel Chart JS change data with dropdown

I'm trying to show data from a chart that gets a specific barangay(village or district) from a dropdown box. So, for example, I have a chart showing the male and female count of one barangay from the ...
takemikazuji's user avatar
0 votes
1 answer
523 views

how to set a custom tick format in chartjs options from laravel controller?

I'm trying to customize the ticks labels by adding the $ sign before the actual value in a bar chart via Laravel Charts. In chartjs docu (https://www.chartjs.org/docs/2.7.3/axes/labelling.html#...
chrisM's user avatar
  • 37
1 vote
0 answers
127 views

How to dynamically generate a multi-dataset line graph in GraphJS?

Data is generated like so: $repResults[] = [ 'label' => (new \Carbon\Carbon($wbwResult->created_at))->isoFormat('DD-MM-YY'), 'data' => [ # datatype cast to int to prevent {!...
Jaquarh's user avatar
  • 6,653
-1 votes
1 answer
46 views

Split assoc array by keys

I have data like this: $movements = [ array( "amount" => 100, "type" => "expense", "Dates" => "2020-01-01" ), ...
Rayvyn's user avatar
  • 77
1 vote
1 answer
100 views

Erro Nova ChartJs SQL Generator when using PostgreSQL

Describe the bug I'm trying to generate a chart, however when I pass the parameter "filter" to SQL Builder, more specifically the file "TotalRecordsController" assembles the query ...
Lucas Lins's user avatar
-3 votes
1 answer
215 views

ERROR : syntax error, unexpected '$app' (T_VARIABLE), expecting ')'

Found in [consoletvs\charts\src\ChartsServiceProvider.php] Error Found this error.. any ideas ?
Amanga Emmanuel's user avatar
6 votes
3 answers
14k views

ChartJS show value in legend (Chart.js V3.5)

I need the value of chart show after name of data for example ([colour of data] Car 50, [colour of data] Motorcycle 200). I've tried change the value of legend title but it doesn't work at all Here is ...
Ray Coder's user avatar
  • 1,091
0 votes
1 answer
80 views

Format array output to be readable by chartjs in Laravel

This is my query to get the product name and total quantity sold. $prd = DB::table('order_details') ->join('products', 'order_details.product_id', '=', 'products.id') ->select('...
Izzat Z.'s user avatar
  • 447
0 votes
1 answer
545 views

Problems with chart.js using Laravel 7, Cannot find element: #app?

I'm using chart.js for showing statistics of reviews and messages of a user, but I'm getting problems with the scripts, now the stats are working but I got this error Cannot find element: #app and I ...
D.D.'s user avatar
  • 111
0 votes
1 answer
208 views

Query with empty results laravel eloquent

I´m traying to create statistics from my database. I´m changing application and before statistics was created from call table. But i change this and i was created a new table statistics and have this ...
scorpions78's user avatar