传递PHP数组以填充多个ChartJS图的有效过程是什么?

I'm working on a new dashboard for a large PHP application to display different report from our systems modules in HTML tables as well as Charts/Graphs on a single page.

I currently have 6 HTML tables that I populated via queries to our databases. I'm wanting to take the PHP arrays and generate ChartJS graphs efficiently without having to create a bunch of files for every graph/array.

I'm obviously still in the early stages of setting up this functionality, but there will be over 100 different reports implemented for our various users and 5-10 reports on any of their dashboards.

Our system is already boggy. What's an efficient/logical way I can pass these PHP arrays to ChartJS without drastically adding to the performance issues?

Just send the arrays to the browser using

echo json_encode( $data );

You would probably want to store that in a hidden field somewhere. After the page is loaded kick off the JS to actually load the charts. I am not very familiar with PhP or ChartJS but this seems like the standard way to pass data from the server to the browser. If I missed the mark and didn't answer your question feel free to ask a follow up and ill do my best to help out.