18 lines
498 B
CoffeeScript
18 lines
498 B
CoffeeScript
|
$(document).ready ->
|
||
|
$('table.list.dates tbody tr').each ->
|
||
|
vals = $(this).find('td.quantity').map ->
|
||
|
val = $(this).html().replace(' ', '').trim()
|
||
|
if (val != '')
|
||
|
return parseInt val
|
||
|
|
||
|
$(this).find('.sparkline').sparkline vals, width: '5em'
|
||
|
|
||
|
vals = $('table.list.dates tfoot th.quantity').map ->
|
||
|
return parseInt $(this).html().replace(' ', '')
|
||
|
|
||
|
$('tfoot .sparkline').sparkline vals,
|
||
|
type: 'bar'
|
||
|
height: '3em'
|
||
|
barWidth: '100%'
|
||
|
barColor: '#9CC5EE'
|