@@ -337,8 +337,7 @@ function beadplot(cid) {
337
337
338
338
tooltipText += region_to_string ( table ( d . region ) ) ;
339
339
tooltipText += `<br><b>Unique collection dates:</b> ${ d . numBeads } <br>` ;
340
- let formatDate = d3 . timeFormat ( "%Y-%m-%d" ) ;
341
- tooltipText += `<br><b>Collection dates:</b><br>${ formatDate ( new Date ( d . x1 ) ) } / ${ formatDate ( new Date ( d . x2 ) ) } <br>` ;
340
+ tooltipText += `<br><b>Collection dates:</b><br>${ formatDate ( d . x1 ) } / ${ formatDate ( d . x2 ) } <br>` ;
342
341
343
342
// Tooltip appears 10 pixels left of the cursor
344
343
bTooltip . html ( tooltipText )
@@ -400,8 +399,7 @@ function beadplot(cid) {
400
399
let tooltipText = `<b>Parent:</b> ${ d . parent } <br><b>Child:</b> ${ d . child } <br>` ;
401
400
tooltipText += `<b>Genomic distance:</b> ${ d . dist } <br><br>` ;
402
401
403
- let formatDate = d3 . timeFormat ( "%Y-%m-%d" ) ;
404
- tooltipText += `<b>Collection date:</b> ${ formatDate ( new Date ( d . x2 ) ) } ` ;
402
+ tooltipText += `<b>Collection date:</b> ${ formatDate ( d . x2 ) } ` ;
405
403
406
404
// Tooltip appears 10 pixels left of the cursor
407
405
bTooltip . html ( tooltipText )
@@ -448,8 +446,7 @@ function beadplot(cid) {
448
446
}
449
447
450
448
tooltipText += region_to_string ( table ( d . region ) ) ;
451
- let formatDate = d3 . timeFormat ( "%Y-%m-%d" ) ;
452
- tooltipText += `<br><b>Collection date:</b> ${ formatDate ( new Date ( d . x ) ) } <br>` ;
449
+ tooltipText += `<br><b>Collection date:</b> ${ formatDate ( d . x ) } <br>` ;
453
450
454
451
// Tooltip appears 10 pixels left of the cursor
455
452
bTooltip . html ( tooltipText )
@@ -517,7 +514,6 @@ function region_to_string(my_regions) {
517
514
*/
518
515
function gen_details_table ( obj ) {
519
516
var details = [ ] ;
520
- let formatDate = d3 . timeFormat ( "%Y-%m-%d" ) ;
521
517
522
518
// Check for a list of samples
523
519
if ( Array . isArray ( obj ) ) {
@@ -527,7 +523,7 @@ function gen_details_table(obj) {
527
523
528
524
// "zip" the sequence details of each sample
529
525
for ( let i = 0 ; i < obj [ j ] . accessions . length ; i ++ ) {
530
- let sample_details = [ obj [ j ] . accessions [ i ] , obj [ j ] . labels [ i ] , formatDate ( new Date ( obj [ j ] . x ) ) ] ;
526
+ let sample_details = [ obj [ j ] . accessions [ i ] , obj [ j ] . labels [ i ] , formatDate ( obj [ j ] . x ) ] ;
531
527
details . push ( sample_details ) ;
532
528
}
533
529
}
@@ -536,7 +532,7 @@ function gen_details_table(obj) {
536
532
else {
537
533
// "zip" the sequence details of each sample
538
534
for ( let i = 0 ; i < obj . accessions . length ; i ++ ) {
539
- let sample_details = [ obj . accessions [ i ] , obj . labels [ i ] , formatDate ( new Date ( obj . x ) ) ] ;
535
+ let sample_details = [ obj . accessions [ i ] , obj . labels [ i ] , formatDate ( obj . x ) ] ;
540
536
details . push ( sample_details ) ;
541
537
}
542
538
}
0 commit comments