rbi-learning / Today-I-Learned

1 stars 0 forks source link

Today I Learned Aug 10 #100

Open paulapereira1 opened 4 years ago

paulapereira1 commented 4 years ago

DAY 10 Lesson

.filter is a method you can call on any array. i.e. I want an array of all numbers greater than 10, I could: const numbersGreaterThan10 = allNumbers.filter(num => num > 10)

Basic Reminders:

Adding the filters: HTML

CSS

input, select { width: 100%; padding: 0.5rem; }

select { text-transform: capitalize; }

Using Chart.js:
1. Go to chatjs.org and click get started
2. Click on Chart JS CDN
3. Click on the `dist/.` folder and copy to clipboard the HTMl tag from the `dist/Chart.bundle.min.js`
4. Paste this HTML tag into your own HTML file
5. Create a new chart i.e. 

New chart(“pie-chart”,{ type: ‘pie’, data:{} });


//We can use reference charts and data from chatjs.org
Functional example reference: https://repl.it/@andyweiss1982/TheVotesAreIn-1#script.js

Canvas is an html element that you use to draw pictures on the screen: `<canvas></canvas>`