docs: function() {
        //to generate a PDF we first need to generate the canvas as done in generatePNG
        //just don't need to download the PNG
        this.generatePNG(false); 
        setTimeout(function(){ 
          html2canvas($("#canvas"), {
               onrendered: function(canvas) { 
                var canvas = document.getElementById("canvas");
                var imgData = canvas.toDataURL(
                 'image/png');              
                var doc = new jsPDF('p', 'mm');
                doc.addImage(imgData, 'PNG', 0, 0);
                doc.save('clinical-timeline.pdf');
              }
          });
        }, 50); //wait for 50ms for the canvas to be rendered before saving the PDF
      }