🔥 Get the code here: github.com/AlexzanderFlores/ChartJS-in-React 🙋♂ Need help? Ask in our Discord community: wornoffkeys.com/discord
@sureshmakwana87093 жыл бұрын
7:04 cannot see the bar on web.... Makes me so angry and upset as I've followed all the steps he said I think I'll have to find some another video on KZbin plus very low voice's volume in the video which was very irritating too
@ShivamSharma-rq9ne2 жыл бұрын
pin the comment which explains the version error. you instead has this promotional thing as pinned. one disliking the video only cause of your sheer negligence.
@ranati20002 жыл бұрын
@@sureshmakwana8709 same issue
@jublirajshelton2 жыл бұрын
Need to use the following code in the latest version. import {Chart as ChartJS, BarElement, CategoryScale, LinearScale} from 'chart.js' ChartJS.register( CategoryScale, LinearScale, BarElement )
@SuperSayiyajin2 жыл бұрын
Thanks. If you have problem about map or category not found. add this line to your bar component import { Chart as ChartJS } from 'chart.js/auto'
@barncha3 жыл бұрын
You're a natural at teaching, thank you so much for this tutorial! It was a great help!
@WornOffKeys3 жыл бұрын
Thank you and glad I could help!
@ferdinand48813 жыл бұрын
@@WornOffKeys hi can you do a tutorial on react-vis?
@MikeCerna3093 жыл бұрын
Been looking for how to use chartsjs all night long and found your vid...very detailed, and a lot of patience plus good methodology to explain things. I learned a lot and got very interested into keep reading the documentation...thank you very much and keep up the good work! Regards from Lima, Peru! Ps. You just got a new subscriber :)
@c4syner3 жыл бұрын
For anyone getting errors try this fix: npm install react-chartjs-2@2.9.0 npm install chart.js npm install react npm instal react-dom The various other "fixes" recommended here gave me random dependency errors as well as blank screens.
@jennaprice55632 жыл бұрын
Unfortunately this did not work and threw a ton of errors: Attempted import error: 'chart.js' does not contain a default export (imported as 'Chart') Here is my dependency list: "dependencies": { "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", "chart.js": "^3.9.1", "react": "^18.2.0", "react-chartjs-2": "^2.9.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" },
@yurikkkj39402 жыл бұрын
man you literally save my life, i was trying this in like last 2 weeks but with your coment i made what i want, so thx man
@afshinmoshrefi3 жыл бұрын
To make sure tutorial works, you have to force chart.js to install version 2.x - the instructions will default to installing chart.js version 3.x which is not compatible with react-chartjs-2. Following installation worked for me: npm install --save react-chartjs-2 chart.js@2.9.4
@l3aIIin233 жыл бұрын
Thank you!!!!
@ajexzetia38783 жыл бұрын
Thank you so much
@vetrivel-yx2on3 жыл бұрын
This comment should be pinned Thank you
@vetrivel-yx2on3 жыл бұрын
How did you find that chart js version is the issue? Could you please explain
@afshinmoshrefi3 жыл бұрын
@@vetrivel-yx2on I read about the new release of chart.js 3 and that there were breaking changes specifically it no longer exports the chart class as a default export. That is when I looked into versioning and it turned out to be the issue.
@dimabernada18093 жыл бұрын
Excellent tutorial, thank you so much, essentially and very fast, one of the best tutorial I have ever seen
@WornOffKeys3 жыл бұрын
Glad it helped!
@sonalisahoo59533 жыл бұрын
If your graph doesnt work, you can try out - yarn add react-chartjs-2@2.9.4 , It gives the prompt in terminal that 2.9.4 doesnt match, so then u could choose 2.9.0. And it works!
@paramshendekar81633 жыл бұрын
This tutorial works well with previous versions, now the documentation has changed and we need to do things differently than before. If you wish to follow this version, make sure you install the very same version
I am having three kind of different errors in console and the chart isnt showing: Errors: 1) Uncaught Error: "bar" is not a registered element. 2) Uncaught Error: Canvas is already in use. Chart with ID '0' must be destroyed before the canvas can be reused. 3) The above error occurred in the component: My Code: import React from 'react' import { Bar } from 'react-chartjs-2' export const BarChart = () => { return( Bar Chart ) }
@amirjosevelasquezaburdene43182 жыл бұрын
Awesome video, thanks!!! Keep going
@EminoMeneko3 жыл бұрын
Very cool. Well explained and I loved the bit about documentation. Too few people do this.
@pshr24473 жыл бұрын
i love chart js man data is beautiful
@Dmitriy_Sentinel3 жыл бұрын
My English is poor. But what the author of the video said - I understood absolutely everything))
@WornOffKeys3 жыл бұрын
Glad to hear that!
@Dmitriy_Sentinel3 жыл бұрын
@@WornOffKeys Сan you tell me, my page is not refreshed when saving an App.js - Updates occur only when the restart project. As I understand it, it is default in React.js page reload and saving changes?
@almirsilva838 Жыл бұрын
Very good! Very useful!
@dalelanto8953 жыл бұрын
Hi can anyone help me uninstall react-chart-js@3.0.3 because i could not install version 2.9.3, it says could not resolve dependency peer chart.js@"^3.1.0" from react-chartjs-2@3.0.3, thank you in advance
@cristinao26143 жыл бұрын
could you resolve this ??
@donatoalvarez30273 жыл бұрын
Just install the v3 chartjs now works.
@sheikhyabooti89603 жыл бұрын
clearly the best
@naumanshigri3 жыл бұрын
oakoran tong hay momo rozi. thank you very much
@mohammadjavadaghazadehfard78732 жыл бұрын
Hi, Thanks 🙏 That's very cool 👌🌹 . please make more videos like this 🙏🙏🌹🌹 . Good luck 🙏
@vivekknShots3 жыл бұрын
TypeError: Cannot read properties of undefined (reading 'map') is anyone getting this error
@zalimbhaiofficial28402 жыл бұрын
use ?.map
@blackhoody31132 жыл бұрын
Why my chart do not shows in chrome? I wrote code as you did and only got white screen. When trying to show some text like Hell World, it shows as it should. So what might be the problem here?
@crashoverride-2024 Жыл бұрын
same problem, did you found the solution ?
@EnaGena2 жыл бұрын
it doesnt work
@leo-fv2nv3 жыл бұрын
Thank you so much 😍 😍 u really saved me.... As beginner it is really helpful.....
@robinbreed2439 Жыл бұрын
great tutorial!
@sergeos54 жыл бұрын
What do you recommend to look so that the data can be taken from the SQL source?
@Eclipse-san3 жыл бұрын
You can make a backend API that uses sequelize to return data. And you can then use axios to send a request to your API. Happy coding
@sergeos53 жыл бұрын
@@Eclipse-san can you help me in that question, my friend?
@ramandamytv11932 жыл бұрын
thank you so much! awesome tut!!
@krishnadhingra27232 жыл бұрын
great video! loved it!
@hplaptop22862 жыл бұрын
Hello If it's possible,could you please put videos in a dropdown box with options like weekly,monthly,yearly?
@deepwebtube3 жыл бұрын
Thank you sir for this video! Simply invaluable!!!
@pratikpowale96572 жыл бұрын
Thank u so much brother!
@Zahra-uc2xq2 жыл бұрын
really helpful thank you
@jayakrishnad73183 жыл бұрын
Very good explanation
@petermashine14832 жыл бұрын
i have error : " Uncaught TypeError: Cannot read properties of undefined (reading 'map') " . what does it mean?
@devtom20603 жыл бұрын
Looks simple, thanks!
@SuperSayiyajin2 жыл бұрын
Can we create 3d bar(column) chart with using Chart.js?
@afshinmoshrefi3 жыл бұрын
Thanks for the tutorial. It is excellent.
@ChrisMochinskiMusic3 жыл бұрын
Very interesting - I'm certain my syntax matches but I'm having no luck on the font size around the 17-minutes mark. I'm flying my chart page into a parent page in React. I wonder if perhaps there's a parent font setting that's killing this option? The parent page is kind of convoluted. Thoughts? Thanks!
@Nefarious_Production4 жыл бұрын
is it possible for you to make the channel specific commands to you're advanced command handler
@WornOffKeys4 жыл бұрын
Yes, this is something I plan on adding to the new revamped command handler once it comes out
@peaichunong3069 Жыл бұрын
Hi, thanks for this tutorial. It is very useful. May I know for the dataset, is that possible to have a range as data? Like from Jan-Sep, to make it something like a range chart or gantt chart? Is that possible?
@GauChymTo2 жыл бұрын
year. I want to get into making soft on desktop because it offers more features but I have just been preferring the softow of mobile apps
@Onomandah3 жыл бұрын
Thank you! We really appreciate it!
@WornOffKeys3 жыл бұрын
No problem, glad the video helped!
@ajbleas3 жыл бұрын
NOTE: HAVING ISSUES WITH "DEFAULT"? npm uninstall chart.js and run npm install chart.js@2.9 . THIS FIXED MINE
@jackgong76583 жыл бұрын
THANK YOU OMG
@ShiyunLian3 жыл бұрын
You save my life
@dalelanto8953 жыл бұрын
could not install --save react-chartjs-2 chart.js@2.9.4 it always says to me peer depency error, and whenever i try to force install it i get this other error : module not found can't resolve chart.js/auto, can anyone help me pls
@dedx40943 жыл бұрын
thanks!. really helped me in my project.
@WornOffKeys3 жыл бұрын
Glad it helped!
@darshang71333 жыл бұрын
Hey how do i import CSV file and plot it ?
@ItsNoahHi3 жыл бұрын
my chart renders multiple times. does anyone know why by any chance?
@ajexzetia38783 жыл бұрын
Thanks bro, your tutorial help me
@erickgeneric3 жыл бұрын
Amazing. Thank you
@IVIattyHD3 жыл бұрын
great vid thank you!
@WornOffKeys3 жыл бұрын
Glad it helped!
@subhamsaurabh30693 жыл бұрын
great explanation 👍👍
@WornOffKeys3 жыл бұрын
Glad you liked it!
@nguyenminhkhoa56132 жыл бұрын
Great course, but when I create 2nd and 3nd chart, its dont show "Lable name", its only show "undefined"
@graziacassano92633 жыл бұрын
Damn man! Finally a tutorial very well explained! Thank you so much. Can't wait to watch other videos. Do you have any on node and fs modules?
@PIDOtomasyon3 жыл бұрын
07:06, I want to use mysql datas for generating charts in HTML page. not PHP. Urgent please. I can show mysql data in html table, but not convert to chart. Thank you so much.
@WornOffKeys3 жыл бұрын
Hey, you will need to use a web server to populate the HTML page with your data from your MySQL server and then send that HTML page to the client. This is done in PHP or Node.JS typically.
@PIDOtomasyon3 жыл бұрын
@@WornOffKeys I am using node.js, at app.js I am sending sql datas to second page as: (app.js) app.get('/chart',(req, res) => { let sql = `SELECT * FROM results`; let query = connection.query(sql, (err, rows) => { if(err) throw err; res.render('user_resultChart', { title : 'RAPORLAMA', users : rows }); }); }); I can response at second page as : (chart.ejs) How can I use in Chart. I want to convert to Chart. I need to use HTML page(Because I can't install php server on the PC) Thank you.
@sureshmakwana87093 жыл бұрын
7:04 cannot see the bar on web.... Makes me so angry and upset as I've followed all the steps he said I think I'll have to find some another video on KZbin plus very low voice's volume in the video which was very irritating too
@soumyagarg47683 жыл бұрын
Try doing yarn add react-chartjs-2@2.9.4 , then select 2.9.0 from the options. npm i chart.js
@chandraroy82542 жыл бұрын
This solved the same issue for me... import { Chart } from 'chart.js' Chart.defaults.plugins.legend.display = false
@ibrahimacanada3 жыл бұрын
Good tutorial !!
@RinatWOT3 жыл бұрын
Great video, thank you!
@WornOffKeys3 жыл бұрын
Glad it helped!
@mehdisheikh6273 жыл бұрын
thanks for veryyyy good comtent 😘😘😘😘😊😊😊😊😉😉😉😉✌✌✌✌
@WornOffKeys3 жыл бұрын
Glad you liked it!
@prakashd8423 жыл бұрын
Excellent
@arshadrauff45493 жыл бұрын
Thanks!!
@yateshchhabra62243 жыл бұрын
Hey mate, I am trying to make multi line graph using chart.js in which i want to add label above and at the left of the horizontal line in which some text is shown in that
@manastripathi24073 жыл бұрын
Amazing. subscribed.
@WornOffKeys3 жыл бұрын
Thank you!
@diegocueva41413 жыл бұрын
PLease, I get linear graphic and not curved, do you know why?
@chaitanyadani42732 жыл бұрын
I am having issues with the bar chart. It is saying cannot read properties of undefined.(reading map).
@dagi_works2 жыл бұрын
Same.
@bekirs42402 жыл бұрын
Download older version or use docs
@유수정-v5q3 жыл бұрын
Thank you soooo much!
@weblord21742 жыл бұрын
I'm following these tutorial and I have everything working until I start adding the elements from Chart JS 2. They are simply not displaying.
@koushiksherugar86802 жыл бұрын
same
@vikrantgupta78963 жыл бұрын
Perfect
@yuecheng35083 жыл бұрын
how do you know the name is ''react-chartjs-2''? I cannot import it
@hamidnaeimi28283 жыл бұрын
npm install --save react-chartjs-2 chart.js
@yuecheng35083 жыл бұрын
@@hamidnaeimi2828 thanks!!
@devcj89622 жыл бұрын
How could you make it responsive for mobile?
@timothyroy201113 жыл бұрын
7:21 For some reason, I see a blank screen. Here's what my code looks like in the BarChart.js: import React from "react"; import { Bar } from "react-chartjs-2"; const BarChart = () => { return ( Some Dat ); }; export default BarChart;
@LMKz13 жыл бұрын
Background color is need
@ganeshtarone19363 жыл бұрын
Did you got the solution for this?
@mariuszyszczarz53053 жыл бұрын
Thanks!
@WornOffKeys3 жыл бұрын
No problem!
@rezaz71673 жыл бұрын
5:04 what kind of extension does this code beautify-er? (adding space around 'Bar')
@WornOffKeys3 жыл бұрын
That is the VSCode extension "Prettier"
@gingerrcat2 жыл бұрын
Hi, how do you do this with data from api? :)
@ferdinand48813 жыл бұрын
Hi can you do a tutorial on react-vis?
@charlesobasi19912 жыл бұрын
Can you create a histogram with chartjs?
@chrollo84833 жыл бұрын
can you make a chart by using firebase data?
@WornOffKeys3 жыл бұрын
In theory you should be able to make a chart with data from any source
@chrollo84833 жыл бұрын
@@WornOffKeys can you make a video tutorial?
@mehedihasanridoy15882 жыл бұрын
Great Video.. But need to update it for now.
@viniciusfrasson46283 жыл бұрын
How to fixed this -> Cannot read property ‘Defaults’ of undefined , I m using function components In reactJs
@lajesfieldspotter43873 жыл бұрын
You need version 2.9.4 of charts.js. 3.x not working for now
@viniciusfrasson46283 жыл бұрын
@@lajesfieldspotter4387 thanks
@ivesscripts88764 жыл бұрын
Early
@sonalisahoo59533 жыл бұрын
Hi, can i get the code pls?
@masj77862 жыл бұрын
not working!
@vaalarivan_p2 жыл бұрын
15:00
@victorete33 жыл бұрын
CORS Policy ):
@masj77862 жыл бұрын
Another tutorial that as of now 2022 doesn't work. The 10th in a row. The person who will create a working React Chart js course will become rich.