How do I activate all chartjs content in bootstrap tabs without clicking on each tab?

148 views Asked by At

I am using printjs to print a chosen html element from my page. That element contains a series of bootstrap tabs. In each tab are some chartjs charts.

The print button will only work after I have clicked on each of the three tabs, and therefore I presume each graph has initiated in the DOM. If the print button is clicked showing the default tab, having not visited the other tabs first, I get this error in the console:

enter image description here

Is there anything with jquery or other method so I can do to overcome this? All of the chart declarations are inside a

$( document ).ready(function() {});

at the bottom of the page. I am actually loading about 3 charts in each tab so have not shown the code for them as it is to long.

0

There are 0 answers