How can i add multiple views to one view without conflict on scripts?

I am trying to add multiple views to one view, but it conflicts with scripts and repeating IDs, these are previsualization views before convert to PDF file, these are generating charts.

What i do to add the multiple views is:

 $view .= view('system.administrator.history.pdf.layout-multiple', compact('sample', 'samples', 'tests'))->render(); // These is into a foreach loop
return $view; // This is what i received at the AJAX function and is sended to a form element hidden to send data to a new view

Function to add multiple views at one is working, my problem is with scripts, and IDs.

Any solution?