Added Javascriptto visualize and export the data as pdf