Тёмный

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

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

How to Parse Dates from PHP MYSQL Database to Javascript to Chart JS
In this video we will cover how to parse dates from PHP MYSQL to Javascript to Chart js. This is a more advanced topic and requires multiple skills. We will need a localhost or server as we are connecting to a database.
What we will do is build the connection and extract the values from the database into an array in PHP. From PHP we can make it JSON readable by encoding it. This will make the information understood by Javascript. From there on we will convert that into proper dates in Javascript so Chart js can read it.
Let's explore this right now!
▬ 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. A special thank you to Janima Camar for asking this question here: • How to Switch Chart to...
▬ 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.com/docs/chart/g...
▬ 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.com/chart-js-blog/
Website: www.chartjs3.com
Udemy Course: www.udemy.com/course/chart-js...
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.6.0 ▬▬▬▬▬▬▬▬▬▬▬▬
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.6.0.
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.

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

 

18 ноя 2021

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@Sumonms
@Sumonms 2 года назад
thanks you sir
@jean-pierregalland7259
@jean-pierregalland7259 2 года назад
I read with great interest your video "How to Parse Dates from PHP MYSQL Database to Javascript to Chart JS" Thank you sir , excellent pedagogy ! Is it possible to have the same with scatter chart (so 2D arrays and why not fetchall in PDO), and an external php file (no php hooks in html file) ? I tried many ways, but nothing works with me. The extracted js variables I got are never exploitable in chartjs dataset. Thank you for your help !
@oludedavid9706
@oludedavid9706 2 года назад
Hello sir, I have a question: I am working with flask-sqlalchemy and mysql database, I have four different date object I got from the query a) x:"Tue, 02 Mar 2022 10:21:19 GMT" for day; b) x:3 for month; c) x: 9 for week; d) x:2022 for year, this are the format in which they appear in javascript after fetching the data and converting to JSON from the database query in flaskalchemy. I have tried to parse this in chart.js but seems impossible or is there something am missing? is it possible to tell chart.js that the integer is march like representing 3 or there is more before that can happen
@abdulsamadmuyideen8517
@abdulsamadmuyideen8517 Год назад
please how can i count number of male and female in database help please with a video or any resources thanks
@ChartJS-tutorials
@ChartJS-tutorials Год назад
Hi Abdulsamad, I understand your question now. I made a video that will be online 7 hours from now. That will cover your question on the JavaScript side. Just wait for that video.
@abdulsamadmuyideen8517
@abdulsamadmuyideen8517 Год назад
Great thank God
@ericaimhigh
@ericaimhigh 6 месяцев назад
Can I get the link to that video now?​@@ChartJS-tutorials
@louietapao4684
@louietapao4684 2 года назад
is it possible to add a date range picker on this tutorial like this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Gc5JF2TUG7o.html
Далее
How to use Double Click in Chart js
11:07
Просмотров 2,6 тыс.
Базовый iPhone 16
00:38
Просмотров 336 тыс.
Старый Дим Димыч вернулся😱
00:16
How to Filter Dates in a Chart in Chart js
41:35
Просмотров 14 тыс.
Графики и диаграммы на PHP и JS
35:38
Apple Responds to Samsung Copying Them
2:52
Просмотров 19 тыс.