Adding visualization javascript