Тёмный

How to Filter Dates from PHP MYSQL Database to Javascript to Chart JS 

Chart JS
Подписаться 19 тыс.
Просмотров 14 тыс.
50% 1

How to Filter Dates from PHP MYSQL Database to Javascript to Chart JS
In this video we will explore how to filter dates from php mysql database to javascript to chart js. How can we connect Chart.js with a database and filter dates along with a date picker. This is a common item many people want to use Chart.js.
To do this we will need to understand how MYSQL works with PHP and get the results as an array. Once we have this we need to parse this data into an date object in Javascript. And afterwards connect this with a datepicker to display the matching date values. This is a quite complicated matter.
Let's explore how to do this.
▬ Chartjs Viewers Question Series ▬▬▬▬▬▬▬▬▬▬
This is part of the Chartjs Viewers Question series. Where we answer viewer questions. This question was asked by one of our viewers.
▬ Materials/References ▬▬▬▬▬▬▬▬▬▬
To keep the video short we might expect you to know parts. These parts we have explained in other videos. You can find the references here below:
Understand setup, config and render init blocks: • How to use config and ...
Starting Code: www.chartjs3.c...
▬ Got a Question? Comment! ▬▬▬▬▬▬▬▬▬▬
Got a question or special request about a specific item? Comment below and tell me your question. I will make sure to follow up on you!
▬ Find Me Here ▬▬▬▬▬▬▬▬▬▬
Blog: www.chartjs3.c...
Website: www.chartjs3.com
Udemy Course: www.udemy.com/...
Chart JS tutorials for Beginners:
🎓 Beginners Serie: • ChartJS intro creating...
Chart JS tutorials for Intermediate:
👁️ Most Watched Chart JS Video: • Update dynamic chart j...
⭐ Personal Favorite Chart JS Video: • How to make an interac...
Chart JS Dashboard Series:
👍 Most Liked Video Series:
Watch Part 1: • How to make a chart dy... ​​
Watch Part 2: • How to make a chart dy... ​​
Watch Part 3: • How to add a dynamic c...
▬ About Us ▬▬▬▬▬▬▬▬▬▬▬▬
Why we created these #chartjs and #javascript video tutorials?
WHY
Creating charts in javascript is very rewarding but extremely challenging. The Chart JS library made it easier to render charts. However the chart js documentation is hard to understand for many. It requires a lot of different moving parts to work along. The canvas tag, javascript, arrays and Chart JS all need to be combined to draw an eye catching bar chart or line chart.
The videos explains the chart js documentation in a more visual and easy to understand way. You can follow along with the code and quickly grasp how it works. We cover the code in chart js but also what truly happens and why something happens when we write a line of code. This fundamental understanding gives clarity to you as a developer in chartjs. In short it is the Chart JS video documentation.
HOW
We answer questions from YOU (viewers) by creating an answer video that covers the questions YOU have posted in the comment section.
WHAT
Our goal is to help YOU learn how to draw charts in Chart JS by showing you in video format how to do it.
Chart JS Video Documentation Site: www.chartjs3.com
▬ Chart JS 3.7.1 ▬▬▬▬▬▬▬▬▬▬▬▬
Chart JS is a javascript library to draw charts in the canvas tag on your site. Presenting data in a visual manner such as charts is more effective and appealing. All the charts are always coded in the latest Chartjs version which is as of this recording Chart JS 3.7.1.
What type of charts can you make with Chart.JS?
With chart js you can make line chart, bar chart, pie chart, doughnut chart, scatter chart, polar area chart, radar chart, gauge chart and area chart. And with some clever tricks and visual adjustment more can be done.

Опубликовано:

 

6 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@hackerprime9722
@hackerprime9722 2 года назад
Thank you so much for this. I made a few modifications so it will show the very last row from the database as the end date dynamically and then I found a tutorial online to subtract that date by one month so it will show a months worth of data by default. I did this since my table has at least 3 months of data and showing all of it all at once was not very user friendly or easy to digest visually. I really appreciate this tutorial and I hope you continue to do a great job.
@TheFoubian
@TheFoubian Год назад
thanks a lot for this clear turo
@markusotte3442
@markusotte3442 Год назад
Thank you, perfekt!
@pramodsawant7310
@pramodsawant7310 2 года назад
Thank you so much sir 😊 If there is no date in the database, will count zero appear in the chart?
@ventussilaban
@ventussilaban Год назад
Thank you so much sir
@charmquark0
@charmquark0 2 месяца назад
how would you go about the 50k values ( the Ajax) method. Would you say load the page first, then ask ajax for the data and update it once it has received it
@gmusic8241
@gmusic8241 Год назад
Wooow, thanks 😊
@dzjam75
@dzjam75 2 года назад
Can the entire code be downloaded somewhere? I checked the link in the description, but could not find it.
@TheShukladhvaj
@TheShukladhvaj 2 года назад
Sir, could you also please show an example using ajax with php where the data is filtered using dates. I am stuck as when I POST the dates using ajax, and use them to filter data on the server side, it doesn't work for some reason. If you could give an example, it would be really helpful. Thank you.
@safiullah7184
@safiullah7184 2 года назад
Please tell us about filtering with time as well.
@ChartJS-tutorials
@ChartJS-tutorials 2 года назад
Hi Safi, thank you for your question. Have you seen this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-vmp3czGfw2U.html
@safiullah7184
@safiullah7184 2 года назад
@@ChartJS-tutorials Yes I have checked it out I need specifically the time(input type="time") for filtering with date as well Thanks for your response
@mindaugasl.9329
@mindaugasl.9329 Год назад
@@safiullah7184 yes it would be helpful to have a date and time inputs combined. Is it possible?
@raselmahmud1029
@raselmahmud1029 2 года назад
28:14 where did you get myChart.update() function? is that build in fn?
@ChartJS-tutorials
@ChartJS-tutorials 2 года назад
Hi Rasel, thank you for your question. Yes the update() is a build in function from Chart.js which is designed to update the values of the chart.
@GalaMatrix
@GalaMatrix 11 месяцев назад
What did u do at 17:39
@ChartJS-tutorials
@ChartJS-tutorials 11 месяцев назад
You mean when the mouse leaves the screen? I clicked on the tab that opens Chartjs.org which was just outside of the recorded screen.
@VinaySehgal-sb8nf
@VinaySehgal-sb8nf Год назад
provide source code?
Далее
How to Filter Dates in a Chart in Chart js
41:35
Просмотров 14 тыс.
Js chart  using php and mysql extremely easy example.
7:15
Chart.JS with Javascript & PHP MySQL
8:56
Просмотров 962
Are we going back to PHP with fullstack JavaScript?
9:57
How Fast Can I Fill My Inbox?
13:30
Просмотров 326 тыс.