CRITICAL NODE-RED DASHBOARD CHART.JS FIX - PRESERVE ALL FUNCTIONALITY
I'm experiencing a Chart.js error in my Node-RED dashboard: Cannot read properties of undefined (reading 'length') at the determineDataLimits function. This occurs when trying to load charts with time-based x-axes.
Current Error Details:

Error location: app.min.js:556 in a.determineDataLimits
Additional 404 error: ui/loading.html not found
Chart.js version appears to be v4
Time adapter (chartjs-adapter-date-fns) was supposedly added but charts still not rendering

REQUIREMENTS (ALL MUST BE MET):

Fix the Chart.js time scale issue:

Ensure chartjs-adapter-date-fns is properly loaded and initialized BEFORE any charts are created
Verify the adapter is compatible with the Chart.js version being used
Confirm the time scale is properly registered with Chart.js


Verify mock data structure:

Mock data must have proper timestamp format (ISO 8601 or Unix timestamps)
Data arrays must have matching lengths for x and y values
Include realistic variance for: OEE (~72%), Availability (~85%), Performance (~88%), Quality (~94%)


Check loading order:

Chart.js library must load first
Time adapter must load second
Chart creation code must execute last
Add console logs to verify loading sequence


PRESERVE ALL EXISTING FUNCTIONALITY:

Home tab - unchanged
Alerts tab - unchanged
Work Orders tab - unchanged
Settings tab - unchanged
Help tab - unchanged
Only the Graphs tab should be modified


Provide complete debugging steps:

Show me how to verify the adapter is loaded in browser console
Provide fallback options if adapter doesn't load from CDN
Include error handling for chart initialization failures


Output format:

Provide the complete Node-RED flow JSON that I can import
Include all necessary HTML/JavaScript for the dashboard template
Mark clearly which nodes have been modified vs. unchanged
Include step-by-step deployment instructions



Additional Context:

Node-RED dashboard is running on http://10.147.20.185:1880
Using Less CSS (app.min.less) for styling
Need hard refresh instructions for different browsers after deployment

Success Criteria:

No console errors after deployment and hard refresh
Charts display with mock data immediately upon loading Graphs tab
All filter buttons are clickable and functional
All other tabs remain completely functional
Solution works without requiring external CDN if possible

Please provide a complete, tested solution that addresses every point above. Include explanations for each fix so I understand what was wrong and how it's been corrected.