percentages for dropped and outcomes in table

average
Matthew Huntington 2 years ago
parent f9c6269846
commit 31bf474b14

@ -12,7 +12,15 @@ const renderTable = () => {
.enter() .enter()
.append('tr') .append('tr')
.selectAll('td') .selectAll('td')
.data(d => [d.instance_id, d.course, d.graduation_date, d.total_students, d.dropped, d.graduates, d.ninety_day_outcomes]) .data(d => [
d.instance_id,
d.course,
d.graduation_date,
d.total_students,
`${d.dropped} (${Math.floor(d.dropped/d.total_students*100)}%)`,
d.graduates,
`${d.ninety_day_outcomes} (${Math.floor(d.ninety_day_outcomes/d.graduates*100)}%)`
])
.enter() .enter()
.append('td') .append('td')
.text(value => value) .text(value => value)

Loading…
Cancel
Save