From the course: Code Clinic: JavaScript
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Controlling the interface - JavaScript Tutorial
From the course: Code Clinic: JavaScript
Controlling the interface
- [Instructor] Now that our chart is looking pretty good, it's time to build this interface part of our application. So what I wanna do is make sure that people can switch to a different date right here and have it automatically update this chart. So it's gonna require two parts. First part is getting the information from the current date and time into these fields and then tracking an event, so that when somebody changes one of these fields, then the chart will automatically update. So we'll take care of putting the information into the fields first. Now, to do that, I'm using a special library called Moment that allows you to deal with dates and times. Now, whenever you have to work with dates and times in JavaScript, in jQuery, and in input fields as well as, like, SQL and PHP, you're gonna notice that every language has a slightly different version of what time should be. So this is a really good library that gives you lots of options for formatting things. Now, I know that we…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Intro: The weather at Pond Oreille1m 51s
-
Solution overview2m 20s
-
Accessing the MySQL database7m 13s
-
Reading data with fetch()4m 17s
-
Passing information to our database2m 56s
-
Charting basic data with C3.js5m 42s
-
Plotting multiple graphs9m 28s
-
Customizing the chart display4m 32s
-
Controlling the interface9m 30s
-
-
-
-
-
-