the code WORKS and you (probably) don't need to change ANYTHING. I see a lot of people misspelling code and saying the problem is the code of the author.
If you are getting a blank page, here's a solution: Replace: labels = [row[0] for row in data] values = [row[1] for row in data] With: labels = [] values = [] for row in data: labels.append(row[0]) values.append(row[1])
This is what I was looking for quite a time. Thank you sir. Would you mind making another vid showing how to call data from database? like mysql or postgres please.
@@gunawanx by sql queries like SELECT * from Table Where Date ='23-01-20221'; you will get list of lists you can make that a dataframe and use it to visualise
how do i separate the data if it comes from a database, I have one column with the id, other with the values and another with the data created, used sqlalchemy and separate them with a colon, f"('{self.valor}','{self.date_created}')" if i try to do like in the video i get "object is not subscriptable" edit: ok managed to solve that replacing the row[0] with the actual Model.valor and row[1] with Model.Date_created, now the problem is the date created appears in the graph but the value doesnt
the HTML file is not recognizing the {{ }} inside the JavaScript script. I have tested putting the data directly in the JS code and it works, to make sure the rest of the code is fine. So for some reason Flask is not rendering the data back to the JS script, really can't see why Any thoughts?
amazing video thanks but I am not getting any thing on my web page even when I copied your code I am not really getting it the web page shows a blank white page with nothing else, And when I type any thing in the body section it shows on the web page but it won't show any thing from the script in the body section can anyone help me with it?
@@_tinker_bell OK it was a while ago but here's the thing there is many packages with similar names and also a lot of versions. So what I did was I went to the docs of this package and rewrote my code. the issue here if you're seeing a blank page is if you pass the (x, y) in any form that the package doesn't expect it won't show anything (a blank white page) and that's really annoying but it's what it's so again head to the docs and follow their instructions the video could be right but it could be a previous version that gets the (x, y) in a whole different way
Nice video, but waht do I do if the graph is generated from an button implementingan asych ajax update and I don't want to generate a new page. I.e. render_template must not generate a new page?
Hi, at first i had similar issues. However it appeared i was passing datetime values which were not consumable to plot as label. Hence i converted them to strings and then the graph worked. Perhaps there are similar errors for you?
Great tutorial, but I would like to use a simple csv as a data source, just two columns: date and values, and I'm struggling to import it via flask correctly... any tips please?
@@tabeab90 red errors means the IDE thinks there's an error, it doesn't mean there is actually an error. The problem here is that using Jinja inside a javascript file is not something VSCode understands. However, as you can see in the video, it works.
the code WORKS and you (probably) don't need to change ANYTHING. I see a lot of people misspelling code and saying the problem is the code of the author.
Great to see you back! Great video, really helped me - love your clear style.
i am getting blank page. please solve the issue.
If you are getting a blank page, here's a solution:
Replace:
labels = [row[0] for row in data]
values = [row[1] for row in data]
With:
labels = []
values = []
for row in data:
labels.append(row[0])
values.append(row[1])
@@thechannel1514 You need to use different source of the script. This source work for me: cdnjs.cloudflare.com/ajax/libs/Chart.js/3.3.2/chart.min.js
thanks
@@xkolm49 also with that source it returns a blank page
same for me
Saved me a day with this video! Great job!
Thanks so much for this. Found this video at the perfect time and it really helped!
This is what I was looking for quite a time. Thank you sir.
Would you mind making another vid showing how to call data from database? like mysql or postgres please.
By sql queries, I can help you let me know what you want indeed..
@@Vidyullathadaurin need help visualize bar chart from mysql in flask, thanks
@@gunawanx by sql queries like SELECT * from Table Where Date ='23-01-20221'; you will get list of lists you can make that a dataframe and use it to visualise
Glad you are uploading again!!
Glad to be uploading again! It’s about time 😁 thanks!
This is great but where's the code you used?
how do i separate the data if it comes from a database, I have one column with the id, other with the values and another with the data created, used sqlalchemy and separate them with a colon, f"('{self.valor}','{self.date_created}')" if i try to do like in the video i get "object is not subscriptable"
edit: ok managed to solve that replacing the row[0] with the actual Model.valor and row[1] with Model.Date_created, now the problem is the date created appears in the graph but the value doesnt
Excellent video! Thanks so much, this helped me a lot
Great video, quick and to the point 👍🏻
the HTML file is not recognizing the {{ }} inside the JavaScript script.
I have tested putting the data directly in the JS code and it works, to make sure the rest of the code is fine.
So for some reason Flask is not rendering the data back to the JS script, really can't see why
Any thoughts?
can i ask how did you do it? im also trying to create the same function but the graph is not showing
amazing video thanks but I am not getting any thing on my web page even when I copied your code I am not really getting it the web page shows a blank white page with nothing else, And when I type any thing in the body section it shows on the web page but it won't show any thing from the script in the body section can anyone help me with it?
same how did you solve it?
@@_tinker_bell OK it was a while ago but here's the thing there is many packages with similar names and also a lot of versions. So what I did was I went to the docs of this package and rewrote my code. the issue here if you're seeing a blank page is if you pass the (x, y) in any form that the package doesn't expect it won't show anything (a blank white page) and that's really annoying but it's what it's so again head to the docs and follow their instructions the video could be right but it could be a previous version that gets the (x, y) in a whole different way
i used the same code, but i am getting blank charts, pls help
same issue, it renders blank page
Same issue, getting a blank page
same here
Nice video, but waht do I do if the graph is generated from an button implementingan asych ajax update and I don't want to generate a new page. I.e. render_template must not generate a new page?
Helped a lot !! Thanks..
Excellent video. Thanks for posting.
Used the same code, getting a blank page
same
Same :(
this stuff neveerrrrr works for me whenever I actually try it. So frustrating
Hi, at first i had similar issues. However it appeared i was passing datetime values which were not consumable to plot as label. Hence i converted them to strings and then the graph worked. Perhaps there are similar errors for you?
Double check your spelling. Mine wasn't working when I misspelled "datasets"
Great tutorial, but I would like to use a simple csv as a data source, just two columns: date and values, and I'm struggling to import it via flask correctly... any tips please?
I can help...get in touch
I have created a simple dashboard which displays chart and basic text data
@@alekhdevari1422 kindly,
can you show me if you have the charts.js of mysql excel sheet data?
Hi Telcado - i am not bale to viewgraph in web browser using flask and oracle database. Can you please help mate
Kudos!! A good one!
Thanks... really help me.
Awesome video!
Thank you! 💥
why dont use a database to simplify the explanation?
Kindly give some time to reply to the problems mentioned in the comments. Im just getting the blank page.
Awesome!
Thank you! 🙏
thank you
Awesome
🚀 thank you!
fιяѕт!!!!
SUB!!
This is junk. The code does not work.
That's weird! You can see it working in the video.
@@tecladocode well all I see in your code are red errors, I have the same ones. Usually your code should't work because of them
@@tabeab90 red errors means the IDE thinks there's an error, it doesn't mean there is actually an error. The problem here is that using Jinja inside a javascript file is not something VSCode understands. However, as you can see in the video, it works.
I am getting blank page. Please help. It's urgent