How to create a Speed-O-Meter with Needle Gauge Chart in Chart.js

Описание к видео How to create a Speed-O-Meter with Needle Gauge Chart in Chart.js

How to create a Speed-O-Meter with Needle Gauge Chart in Chart.js

00:02 Creating a speedometer with needle gauge in Chart.js
02:15 Converting a bar chart to a doughnut chart with adjustments
06:27 Creating a speedometer with 3 colors and a needle gauge.
08:28 Creating a gauge needle block in Chart.js
12:33 Calculate the total from data sets and use array reduce method.
14:42 Calculating the needle value and angle for the Speed-O-Meter
18:38 Creating a circle using ctx.arc
20:36 Calculating the dynamic positioning of the needle on the chart.
24:15 Creating a needle gauge chart with Chart.js
26:08 Creating a gauge chart and drawing the needle
30:07 Understanding the height and rotation in the chart.
31:56 Calculate the top point of the speed-o-meter in Chart.js
35:38 Creating a needle gauge chart with Chart.js
37:30 Creating a Speed-O-Meter with Needle Gauge in Chart.js
41:08 Adjusting and customizing the needle gauge chart in Chart.js
43:01 Getting tooltip items and extracting data values

In this video we will create a speed-o-meter with needle gauge chart in Chart.js. A speed-o-meter chart would track speed or other types of value by pointing it with a needle. Chart.js does not support this out of the box but it is possible to combine certain items together.

With the doughnut chart we can create a gauge chart with some modifications and add a needle to it with canvas. This creates a great speed-o-meter gauge chart.

The topic is quite complicated but we take it slow and make it easy to follow. However, it is worth to learn as this will open up many new doors.

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. This question was asked by two viewers.

A special thank you to David Dewasmes for asking this question. You can find the question here asked on this video:    • Chart JS Pie Chart  

And A special thank you to Nilesh Kumar. A special thank you for asking this question. You can find the question here asked on this video:    • Chart JS Pie Chart      • How to create Heat Map Chart like Git...  

▬ 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 setup in a line...  
Starting Code: https://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: https://www.chartjs3.com/chart-js-blog/
Website: https://www.chartjs3.com
Udemy Course: https://www.udemy.com/course/chart-js...

Chart JS tutorials for Beginners:
🎓 Beginners Serie:    • ChartJS intro creating a chart 2018 |...  

Chart JS tutorials for Intermediate:
👁️ Most Watched Chart JS Video:    • Update dynamic chart js | Chart.js Co...  
⭐ Personal Favorite Chart JS Video:    • How to make an interactive bar chart ...  

▬ 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: https://www.chartjs3.com

▬ Chart JS 3.5.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.5.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.

Комментарии

Информация по комментариям в разработке