From the course: DC.js for Data Science Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Getting creative with dataGrid

Getting creative with dataGrid - JavaScript Tutorial

From the course: DC.js for Data Science Essential Training

Start my 1-month free trial

Getting creative with dataGrid

- [Instructor] Have you ever been shopping online, and switched from list view to grid view? DC's dataGrid will let you make this kind of grid, and you can pull in images if you like, as you can see. In fact, dataGrid is very flexible. It allows you to write your own HTML code, and then it spews out the bit of code that you've written once for every data point that you pass it in. We're going to use our old, basic data with 12 rows that contained payment information at a restaurant, and we're going to start with the dataTable file, because it's got quite a lot in common with dataGrid. So we can save that. And before we carry on, I'm going to use some images in my dataGrid. You don't need to use images in a dataGrid, but I think it's quite effective to do so. So I'm just going to copy those across. Like so. Now, let's update a few things. Many things we can keep the same, but for good practice we'll change the variable name, and the DC class type is dataGrid now, not dataTable. You can…

Contents