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
0 answers
30 views

How to use all the functions of Chart.js in a php controller

I'm transferring the graphic generation from js code to php, but functions such as borderRadius and legend => display = false don't work. I need borderRadius, because roundedBars does not ...
Pasha's user avatar
  • 1
0 votes
0 answers
43 views

on second visit chart and button not working

<?php if (!isset($_SESSION)) { session_start(); } if (!isset($_SESSION["loggedin"])) { if (!header("Location: index.php")) { header("Location: index.php&...
user2219485's user avatar
1 vote
1 answer
167 views

Chart.js image with php excel [closed]

What im trying to do is convert chart.js to image with toDataURL then past it using ajax and using the url to set image path for php excel. I want to past the data without using any button and my php ...
Unknown's user avatar
  • 37
1 vote
1 answer
83 views

How to fix data not show in page but appear in network preview

im trying to post image that been convert to url by using ajax. The problem is $image = $_POST['imgData']; not show anything but if i check developer tools on network preview the data can be seen. ...
Unknown's user avatar
  • 37
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
0 answers
145 views

Using Chart.js and the chart suddenly stopped working correctly

Short version: I was working on an assignment on my localhost building a poll. I got it working and everything looked good so I uploaded it to my website so I could check it and then submit it. Then ...
WastelandSniper's user avatar
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
1 vote
1 answer
59 views

How to hide a value on x axis chartjs

I'm working on a scatter with chartsjs. I declare all the value, type category. I want to hide some value from the scale. My scale is: 0,5,10,15 etc I don't want to show the label for value 5 and 15. ...
Dannny's user avatar
  • 13
2 votes
1 answer
32 views

Double axis Y in Chart.js

i want to ask for some questions about chart.js. I have been create my dashboard with chart.js for showing my database on user interface, but. I have a little bug on Axis Y in chart.js, like double ...
Muhamad Afrizal's user avatar
0 votes
1 answer
369 views

Charts Initialization Issue using GridStack.js & Charts.js in PHP Yii2

I am trying to make a dashboard in PHP yii2 project using gridstack.js and chart.js I have given a dropdown button where the user can select the KPI chart, the selected chart gets added to the grid of ...
MT-Dev's user avatar
  • 39
0 votes
0 answers
48 views

Chart.js The second line in Chart.js is incorrectly positioned in X-axis

I have created multiple line chart, but the second line incorrectly positioned according X-axis, got the same starting point as first line, but by JsonData it has another starting point. How to fix it?...
Мадияр Бижан's user avatar
0 votes
1 answer
91 views

How to Determine Minimum and Maximum Degree Of Chart Javascript

I have an wheel of fortune from chart and javascript code. I copy [https://www.codewithrandom.com/2023/11/24/spin-wheel-app-using-javascript/](this site) and everything is working fine. What I want to ...
martin gutierez's user avatar
0 votes
0 answers
60 views

Get PHP variable without include() - Chart.js

I am building a client portal and I am using Chart.js to make a basic Gantt Chart. I have everything working except for the SQL code to get the data before parsing it with JSON. If I hard-code: "....
Caitlin O's user avatar
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
2 answers
81 views

PHP SQL Query into a chart.js bar chart - Issue with the array

I'm successfully getting the sql data into an array, what I can't seem to work out is how to get that array to show in a chart.js chart. I can get the array into the dataset section but for some ...
northwarks's user avatar
0 votes
0 answers
214 views

Stacked bar chart from chartjs mysql

i am struggling to make chartjs stacked bar chart from MySQL table. Here is the JSON response and codes and I want to know how to put it into the stacked bar chart. Sql query function getStudentMark() ...
Kavinda nuwan's user avatar
0 votes
0 answers
57 views

ChartJS Linegraph not drawing lines

I am attempting to create a linegraph using chartjs, but the lines do not show. I am not sure why they do not show. I have tried googling this issue with no results, and would appreciate any help. ...
Steve's user avatar
  • 19
0 votes
0 answers
86 views

Pie chart using Chart.js not showing up in browser

I'm currently doing my web programming assignment where I'm tasked to create a travel blog website. For this project, I'm using HTML, CSS, JavaScript, PHP, and XAMPP. In this project, I'm responsible ...
Danial Shuhaimi'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
0 answers
41 views

Why is my data not being displayed when drawing the bar graph?

I have an php file that is succesfully drawing the chart through the below script, but for some reason the chart is not loading the data, below is my script as well as the php file. <script src=&...
zbzbzbzbzbzb's user avatar
0 votes
1 answer
69 views

Chart.js scatter plot data not working with array constants from php

I'm attempting to use chart.js to make a scatter plot graph with arrays as the x and y values. I'm getting the contents of these arrays from a sql query using php earlier in the file. It seems to work ...
KyleNoCompile's user avatar
0 votes
0 answers
75 views

Laravel 10.4 with ChartJS - x-axis false text

I am learning how to implement Charts in Laravel. I followed some basic instructions found on the internet and managed to connect to the DB, but in the X-axis I wanted to see the days of the week, but ...
M1k's user avatar
  • 5
0 votes
1 answer
80 views

Blank Canvas with labels at the top with strikethrough on them when using chart.js pie chart

I have the following code that is attempting to display a summary of the most popular forms as defined by the number of inserted rows in their respective database tables and display this as a pie ...
Anseur's user avatar
  • 53
0 votes
1 answer
113 views

Chart.js data from multiple queries

I am trying to plot a chart using Chart.JS with data from multiple MySql queries. However, when I tried loading it, the graph only display one month. Any idea how I can do this? Thank you. Hope you ...
Katherine's user avatar
0 votes
1 answer
401 views

Chart.js 3 - How to count MySQL entries by month and display them in a bar chart

I have a database with entries I'd like to count per month and display them in a yearly bar chart from Jan to Dec. I must admit I'm fairly new to MySQL and PHP so please bear with me. I can see the ...
Empire Hive's user avatar
-2 votes
1 answer
256 views

I can't get my chart to display when declaring variables not recognized by chart js

I would like to show in my graph the total number of patients obtained for each month of the year 2021. But no information is shown on the graph, rather, the graphs disappear. When executing the code ...
user287003's user avatar
0 votes
0 answers
14 views

JavaScript callback-function in PHP-Array [duplicate]

I have a PHP-array for the Javascript Library chart.js and it´s like this: $array = [ 'options' => [ 'plugins' => [ 'tooltip' => [ 'callbacks' => [ 'label' => "function(context) { ...
Kalle's user avatar
  • 31
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
40 views

My Charts.js line chart dissappers when I try to flow my data from mysql using php

I'm having a issue with my charts like I stated in the title. When I try to get my data from MySQL graph disappears and I'm not getting any errors. but graph perfectly works when I'm entering them ...
Meriç's user avatar
  • 1
2 votes
1 answer
197 views

Chartjs 4.1.1 Y axis scale

I would like to set min and max scale in Y axis, I've been tried suggestedMin, min and max, but it doesn't works. This message is displayed at the console Uncaught SyntaxError: Cannot use import ...
Leonardo Feriato's user avatar
0 votes
1 answer
121 views

Trouble with setting up radar chart data on chart.js; issue with a loop

I have a plugin I'm coding for wordpress, that uses a short code and provides the ability to choose post types, taxonomies, and colors of the grouped taxonomy terms.. It counts and labels all terms in ...
Kyle A's user avatar
  • 11
1 vote
1 answer
72 views

chart.js PHP to JS string conversion question [duplicate]

I am querying wordpress ACF fieldsdata which needs to plot into a chart.js radar type chart. <?php // Query posts $args = array( 'post_type' => 'resultaten', 'tax_query' => array( ...
Jasper's user avatar
  • 27
1 vote
1 answer
871 views

Symfony UX chart does not show chart in easyadmin

I have a problem with displaying a chart in easyadmin. It does show up in the HTML as shown below. <canvas data-controller="symfony--ux-chartjs--chart" data-symfony--ux-chartjs--chart-...
Chris America's user avatar
0 votes
1 answer
37 views

How to display dynamic PHP ID in chartjs

I am using chartjs inside PHP foreach for multiple charts. Im in a situation to call dynamic ID. I want to use ID as fulltime_32, fulltime_33 and so on. in the PHP foreach statement. I am getting ...
Farz Ad's user avatar
  • 49
0 votes
1 answer
379 views

Can't create multiple charts with Chart JS

For some reason, only one chart gets created, and I cannot find out why. I'm trying to combine PHP and javascript. Everything gets proper value from PHP. I console-logged them. I don't know what I'm ...
Sandor Kalmár's user avatar
1 vote
1 answer
58 views

dynamic chart.js not showing correctly

I've this canvas in chartjs whish is not working as i thought it would. The code below gives me the screenshot at the bottom. The lines are next to each other and was hoping or 2 lines 1 above the ...
hexedecimal's user avatar
0 votes
0 answers
906 views

Display dynamic values from mysql with chart.js [duplicate]

Preliminary I am quite new to JS and php (since Monday). I have a database where I store data at certain time intervals. With chart.js I want to visualize this data, static no problem: <?php $...
TXmahoo's user avatar
0 votes
0 answers
49 views

I can't show the values of my database in a graph using chartjs

I'm trying to practice with chartjs, so I've downloaded some code from the Internet to adapt it to my needs. I need to display the number of patients who were born in a specific month based on their ...
user287003's user avatar
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
-2 votes
1 answer
107 views

Chart.js Convert JSON to PHP array

I am creating a Time Cartesian Chart from Chart.js, I need to get the data as json format, however I need to first generate a php array and use json_encode() in order to get the following json. Does ...
JHope's user avatar
  • 81
-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
1 answer
215 views

Symfony Ux using chartJs : How can i feed the x's axes data?

I want to make a graph with specific y and x. I discovered that to make this kind of graph, the right type is "SCATTER" so here is my code in my service : $chart = $this->chartBuilder-...
Cephalopodius's user avatar
1 vote
1 answer
263 views

Chartjs.org Displaying different data on Radar Chart tooltip

For example, on the tooltip, I want to show the data for option1 not 2 but 200. Because we show adapted data in the graph. But it will be better to show the real data on the tooltip. <script> ...
Bekir Çelik's user avatar
0 votes
1 answer
412 views

How to make yii2 chartjs horizintal

I'm using 2amigos/yii2-chartjs-widget to draw charts and everything works fine except the chart orientation, I want to make it horizontal. like this: My code is: <?=ChartJs::widget([ ...
Nour Naji's user avatar
0 votes
1 answer
199 views

I want to make a stacked bar graph which has target of 60 using chart js

I want to create a bar chart using chartjs which will show how much more needed to achieve 60 which will be shown in red bar above. Below will show the current amount in blue. Let's say I have to ...
Thaneshvaran Ravendran's user avatar

1
2 3 4 5
11