Write an LWC that loads a third-party JavaScript charting library (like Chart.js) from a Static Resource to visualize data fetched from Apex. Ensure the script only loads once, the chart only renders after both the DOM and data are ready, and prevent memory leaks when the user navigates away from the page.