Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Chart.js Panning Not Working in ASP.NET MVC Application Using chartjs-plugin-zoom

I'm developing an ASP.NET 8 MVC application where I'm using Chart.js to display two real-time line charts: one for "Penetration Depth" and another for "Hydrophone Audio Levels." I’...
dylan DA's user avatar
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
68 views

My chart keeps resizing when I redraw it. How do I stop this from happening?

Note: This is using the chart.js library inside a Django template I am creating a doughnut graph (see image 0) with some data. Then, I destroy the instance of that chart and redraw it (see image 1). ...
Tom Gob's user avatar
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
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
1 vote
0 answers
79 views

How to prevent delay in chart rendering from .parquet data fetched from Flask backend?

I am trying to create a simple GUI dashboard by fetching data using a back end Flask server by triggering an AJAX request when I interact with the multi check box drop down menus. Essentially, I have ...
Monami Bhuyan'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
1 vote
1 answer
159 views

Uncaught TypeError: Cannot read properties of undefined (reading 'CountOf') from my sql query

I have a table in database with the emotion field which can currently store max 7 emotion of a human face 'angry','disgusted','fearful,'happy','neutral','sad','surprised'. I want to create a chart ...
Rohit Kumar's user avatar
0 votes
0 answers
1k views

Chart.js 4.0.1 Uncaught ReferenceError: Chart is not defined

I wrote an AJAX Javascript code for my ESP32 datalogger which worked so far using old versions of Chart.js. The website hosted by the ESP32 is not working anylonger if I use a more recent of Chart.js. ...
Elektrofeldmeter's user avatar
0 votes
1 answer
462 views

Dynamically change ChartJS Line Chart using Jquery

I'm receiving 3 arrays from server as a response and I'm trying to create a line chart using ChartJS. The line chart turns out to be fine when I feed in the static values but it doesn't reflect the ...
RMT's user avatar
  • 125
1 vote
1 answer
133 views

not able to pass array in chart js with ajax

I have some trouble when trying to display dynamically fetched data in my bar chart using chartjs , the passed array variable can't display properly the data and keep showing nothing I tried by ...
ibtissam elhammoumy's user avatar
2 votes
1 answer
7k views

How to add on click event to chart js

Hello I have a question concerning js charts. I have already created one in django application and i want to generate a javascript alert by clicking a certain point in the chart. How can the alert get ...
ilyés Tabessi's user avatar
2 votes
1 answer
567 views

Chart.js 3.7 version. How to modify legend label?

i am trying to edit it in the labels:{}, but only color is changing but not the text do let me know if there is a way plugins: { legend: { display: true, position: 'top'...
Muhammad Qasim's user avatar
0 votes
1 answer
731 views

Charting Commodity Data - Issue getting the dates and values in JSON

{ "data": { "success": true, "timeseries": true, "start_date": "2022-02-01", "end_date": "2022-03-02", "...
Xeverus's user avatar
  • 125
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
0 answers
424 views

Update Chart JS with Ajax

So i try to update my Chart (ChartJS) in my Twig Template with Ajax. I have a table which is filled with different categories. If the user click on one tr, the Chart in the twig-template should update ...
LittleEast's user avatar
0 votes
0 answers
59 views

how to pause setInterval and resume if there is new data from database?

How to pause setInterval if all data from the database are loaded and resumes if there is new data from the database without manual page refresh? The problem with this if I will not use clearinterval()...
Jack Junior's user avatar
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
0 answers
3k views

Uncaught TypeError: Cannot read properties of undefined (reading 'datasets')and(reading 'initialize')

Update: I was able to solve the error after using method provided by Mr Ivar in the comment(In config object, change ThisMonthData to data: ThisMonthData).Thank you Ivar. I am putting JSON data into ...
Lindsay's user avatar
0 votes
1 answer
741 views

Frontend and backend for chart using chartjs, mongodb, and controller

I am new to generating a chart using the ajax mechanism and chartjs. It seems that I managed to generate the graph but they are plotted incorrectly. Please enlighten me on how I could improve. Would ...
user17239308's user avatar
0 votes
1 answer
1k views

How to update data from ajax call (chart.js)

I manage to generate a graph from an ajax call coming from a php file. I want to modify this graphic from the selection of the customers field (chg_customer) via a drop-down list. My drop-down list ...
Alex Faure's user avatar
0 votes
1 answer
966 views

Dynamic Chart in PHP using Chart js

I am not being able to show the values from my PHP file into my HTML file using Chart js. I am trying to import it through AJAX request. I tried it through printing the database value as JSON in the ...
Sadikul Alim Toki's user avatar
1 vote
1 answer
44 views

Ajax won't retrieve the data from my script

Hello so i try to retrieve data from a .php with Ajax to make a Doughnut chart with Chart.JS Here is what i have (value 1, 2, 3, 4 in the legend order) : This is my Chart.JS Script : // Set new ...
Komplex9's user avatar
-1 votes
1 answer
78 views

how to combine to array for chartjs width php

i need help how to make php code for array data to chartjs, i use 2 table and i hope to generate array code like below function revenueCost(year) { $.ajax({ headers: { 'X-CSRF-...
dede nurjanah's user avatar
1 vote
1 answer
1k views

Update Chart.js data with ajax

I want to update my chart with ajax and Flask but I can not update the data: var chart = new Chart(canvas, { type: "line", datasets: [{ label: 'My Dataset', }] }) $...
Bilal's user avatar
  • 131
2 votes
1 answer
245 views

Re-running chart.js with different variable

On page load my code generates a bar chart via AJAX request: function docharts(name) { $.ajax({ url: "sql/getdata.php", method: "GET", data: { staff: name, ...
user1765369's user avatar
  • 1,395
1 vote
0 answers
53 views

Ajax-JQuery-Chartjs Uncaught TypeError: response is undefined

my declaration of charts.init() and charts.CreateCompletedJobChart() is indefined this my source code , the response is the result of my controller to show the dynamic labels months and data_count (...
TsioryHL's user avatar
0 votes
1 answer
164 views

ChartJS glitches

I have a drop down menu where it has all the months in it, once selecting a month, it will show a pie chart with delivery statuses (delivered/not delivered). I think it glitches because the past pie ...
Allysha April's user avatar
0 votes
1 answer
81 views

Ajax automatically placing double quotes around variable data returned in success call

I'm trying to build a chartjs horizontal bar chart using Ajax in an MVC application. Everytime the data returns, it places double quotes around the data returned from the variables. My code: **<...
Nick.Edwards's user avatar
2 votes
1 answer
2k views

How to create Bar chart that gets updated from new ajax requests with ChartJS?

I'm building my app with Flask and MongoDB. Right now I'm having some hard time trying to figure out how to allow my bar chart to change dynamically according to my different ajax requests based on a ...
wk14's user avatar
  • 207
0 votes
0 answers
167 views

Django and chartjs using json (doesn't show chart)

I'm trying to display a chart in Django with data from database using JSON. When I go to /distancechart I see my data printed. But when it comes to chart I get blank screen, nothing shows. I was using ...
cherryBom's user avatar
2 votes
1 answer
4k views

Trying to load a chart with chart.js, through ajax and php

I have created a php page where the graph works fine if loaded in the browser. <!DOCTYPE html> <html lang="en"> <head> <title></title> ...
Source's user avatar
  • 1,036
0 votes
1 answer
102 views

Why is chartjs treating these arrays differently?

I'm using ChartJS to build a line graph. The data is coming from an API. I take the data points from the API and use the push method to build an array to be used in the parameters of ChartJS data: { ...
LaravelSucks's user avatar
3 votes
1 answer
2k views

Filter ChartJS using data from PHP

I would like to filter my chart by month so I made a <select> input above it. The chart is showing properly but when I changed the month options, the data is not updating based on the value ...
Richelle's user avatar
  • 119
3 votes
1 answer
1k views

Dynamically created Chart.js chart overpopulating time based x-axis?

I want to create a chart.js line chart with values on the y axis and dates on the x-axis. However, when I populate the chart, the x-axis is filled with ticks that shouldn't be included (you can see my ...
af3ld's user avatar
  • 794
1 vote
0 answers
111 views

how can i fix this "ajax request entity too large"

I'm using Chart.JS. I want to encode canvas as base64 and deliver it to the server. But the capacity is too big, so I keep getting errors. Do you happen to know how to solve it? Here's my code. Help! ...
labongtoo's user avatar
1 vote
0 answers
137 views

How to access objects in my template from Django view?

I need to display attributes of each object exisiting in data.How can I access the objects in my template? Views.py data = [] for e in rep: data.append({ 'time' : e.time, '...
Farzan's user avatar
  • 198
0 votes
1 answer
76 views

javascript count daily occurrencies from a datatable for the creation of a linechart

I have a datatable with a Datetime column and each day the table gets populated with new data with the relative timestamp in the datetime column. I need to calculate, for each day, how many ...
thranduil90's user avatar
1 vote
1 answer
233 views

Populate chartjs ajax with datetime fields

I'm trying to make a chart with chart.js. I have php code which brings back datetime data with an ajax call. The problem is, it doesn't show any data, and it doesn't show errors. I used console.log() ...
carlosale2's user avatar
1 vote
1 answer
144 views

Can't pass data to chart.js graph

I’m trying to pass my data to the graph but it won't work. If I add numbers to it manually like data: [1,2,3] Than it works. In my code you'll see that I console.logged my data.weight and data.goal. ...
Dániel Mozsár's user avatar
0 votes
1 answer
688 views

Chart.js after ajax refresh there are two charts in the same container (new and old)

I have a scatted chart (chart.js) and a form-control for user to change the time period of the chart. When user selects different option in form-control, an ajax script is invoked to get a new set of ...
Krzysztof Patra's user avatar
0 votes
1 answer
95 views

Separating list of data in Ajax

I have a list that contains 4 data from a python script that is being called by an Ajax function. I cannot figure out the method to separate it. The reason I need it to be separated is because each ...
Sharvin's user avatar
  • 98
0 votes
2 answers
1k views

update my chartjs form without refreshing page

I have a form that when i submit changes the data of my charts using the dates put in: <form action="{{route('home')}}" method="get" id=""> &...
codingWithNikki's user avatar
0 votes
1 answer
267 views

How do I loop under Chart js in JavaScript for multiple axis?

I'm trying to loop into a chart js in order also to enable multi axis... however the function for seems to be giving an "unexpect token "for""... var getData = $.get('/graphcomp'); ...
Rafael Sitta's user avatar
-1 votes
1 answer
689 views

How to load Json data onto a Charts.js chart

I would like to display the data variable "temp" which is listed by ID under (.list) on the following Json (http://api.openweathermap.org/data/2.5/forecast?lat=53.4808&lon=2.2426&...
Very Weather's user avatar
0 votes
3 answers
4k views

How do I add an image in the middle of Donut Chart?(Chart.js)

I'm using Chart.js to visualize my datas like below image. I want to add a photo in the middle of chart. How can I add a photo in the middle of Donut Chart? Here my javascript code: $.ajax({ ...
floopie's user avatar
  • 28
0 votes
1 answer
422 views

Get Array with json without _chartjs: {…}, push: ƒ, pop: ƒ, shift: ƒ, splice: ƒ, …]

I have a problem to load chartjs. I need get an array like : ["5000", "14000", "10000"] but, I get: ["5000", "14000", "10000", _chartjs: {…}, push: ƒ, pop: ƒ, shift: ƒ, splice: ƒ, …] This is my ...
Joen King's user avatar
1 vote
2 answers
548 views

How to display different datasets from different ajax calls in the same ChartJS?

I'm trying to display different datasets, from different ajax calls, in the same chartJS. The idea is to show different stats per month, on 13 consecutive months. 1 ajax call = 1 stat for each of the ...
HugoVirot's user avatar
1 vote
1 answer
71 views

Chart.js - Ajax response not accept

chart.js not accept ajax post - json respose.i couldn't solve it yet.please help.. https://prnt.sc/spt4p3 https://prnt.sc/spt6j0 my json file is: [{"DAYS":"01.05.2020","VALUES":"0"},{"DAYS":"02.05....
Suat Kocabas's user avatar
0 votes
2 answers
217 views

Unable to change size of Chart.js

Unable to change size of chart.js on HTML. Have tried to set the canvas parameter along with defining a section and div tag and then explicitly assigning height and width in <style>. Have also ...
nomadev95's user avatar
  • 125

1
2 3 4 5