Fetch API And Update JSON Data on Click in Chart JS

preview_player
Показать описание


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 ▬▬▬▬▬▬▬▬▬▬

▬ 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:

▬ 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 ▬▬▬▬▬▬▬▬▬▬

Chart JS tutorials for Beginners:

Chart JS tutorials for Intermediate:

Chart JS Dashboard Series:
👍 Most Liked Video Series:

▬ 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 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.
Рекомендации по теме
Комментарии
Автор

Copy and save it as a JSON file.
This is the code for the JSON file:

{
"year": "2021",
"financialreport": [
{
"company": "ChartJS",
"companyname": "ChartJS Corp",
"companystock": "CHRT",
"financials":
[
{
"date": "January",
"revenue": 90,
"expenses": 30,
"profits": 60,
"target": "Target 1"
},
{
"date": "February",
"revenue": 120,
"expenses": 30,
"profits": 90,
"target": "Target 2"
},
{
"date": "March",
"revenue": 150,
"expenses": 30,
"profits": 120,
"target": "Target 3"
},
{
"date": "April",
"revenue": 180,
"expenses": 30,
"profits": 150,
"target": "Target 4"
},
{
"date": "May",
"revenue": 210,
"expenses": 30,
"profits": 180,
"target": "Target 5"
},
{
"date": "June",
"revenue": 240,
"expenses": 30,
"profits": 210,
"target": "Target 6"
},
{
"date": "July",
"revenue": 270,
"expenses": 30,
"profits": 240,
"target": "Target 7"
}
]
},
{
"company": "ChartFlix",
"companyname": "ChartFlix Inc.",
"companystock": "CX",
"financials":
[
{
"date": "January",
"revenue": 270,
"expenses": 30,
"profits": 240,
"target": "Target 21"
},
{
"date": "February",
"revenue": 180,
"expenses": 30,
"profits": 150,
"target": "Target 22"
},
{
"date": "March",
"revenue": 150,
"expenses": 30,
"profits": 120,
"target": "Target 23"
},
{
"date": "April",
"revenue": 210,
"expenses": 30,
"profits": 180,
"target": "Target 24"
},
{
"date": "May",
"revenue": 120,
"expenses": 30,
"profits": 90,
"target": "Target 25"
},
{
"date": "June",
"revenue": 180,
"expenses": 30,
"profits": 150,
"target": "Target 26"
},
{
"date": "July",
"revenue": 210,
"expenses": 30,
"profits": 180,
"target": "Target 27"
}
]
},
{
"company": "Chart Start Up",
"companyname": "Chart Start Up",
"companystock": "START",
"financials":
[
{
"date": "January",
"revenue": 3,
"expenses": 1.5,
"profits": 2.5,
"target": "Target 31"
},
{
"date": "February",
"revenue": 6,
"expenses": 3,
"profits": 3,
"target": "Target 32"
},
{
"date": "March",
"revenue": 9,
"expenses": 6,
"profits": 3,
"target": "Target 33"
},
{
"date": "April",
"revenue": 18,
"expenses": 9,
"profits": 9,
"target": "Target 34"
},
{
"date": "May",
"revenue": 12,
"expenses": 3,
"profits": 9,
"target": "Target 35"
},
{
"date": "June",
"revenue": 24,
"expenses": 18,
"profits": 6,
"target": "Target 36"
},
{
"date": "July",
"revenue": 18,
"expenses": 18,
"profits": 0,
"target": "Target 37"
}
]
}
]
}

ChartJS-tutorials
Автор

hey man just came back here again to say thanks for everything cheers bud

eicnslsicjwn
Автор

Hi. Many thanks for your amazing videos. Could you make one video where you add error bars, please!!!
Many, many thanks

edenmaga
Автор

Please make a dedicated video on Alpha vintage api chart

sakshamgupta
Автор

Hi Great Tutorial!!!
How i can export it to json file !?

oumaymakelmi
Автор

I have one problem what if i want to filter my data in date format using calendar start to end date and it should be json data ??? is there any tutorial on it??

Omhange
Автор

can you add the json file please as mentioned?

rapidresultsmarketing
join shbcf.ru