This screen provides fleet analytics and is available atDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
/fm/fleet/analytics.
Overview
The Fleet Analytics page usesuseFleetTrendData for trend data and computes per-vehicle stats by querying fm_fleet_mileage_logs, fm_fleet_fuel_logs, and fm_fleet_trips directly via Supabase for each vehicle. A Period selector controls the analytics timeframe: Last 30 Days, Last 90 Days, Last 6 Months, Last Year. Five KPI stat cards display: Total Miles, Total Fuel Cost, Avg MPG, Cost per Mile, and Total Trips. Two charts are rendered: FleetMileageTrendChart and FleetFuelCostChart (both use trend data). A FleetVehicleComparisonTable shows per-vehicle: vehicle number, make, model, year, total miles, total fuel cost, avg MPG, cost per mile, and trip count.
Who it’s for
Requires permissionfm.dashboard.view.
Before you start
- Fuel logs, trip logs, and mileage logs must be recorded for meaningful analytics.
- The period selector defaults to the last 6 months.
Steps
Key concepts
- Cost per mile —
totalFuelCost / totalMilesper vehicle for the selected period. - Trend period options —
30d,90d,6m,1y(values fromTrendPeriodtype). - Vehicle comparison data — aggregated from three separate Supabase queries per vehicle run in parallel.
Related
Facilities & Inventory
Facilities & Inventory core overview.
Governance & parity
Documentation coverage and governance.
This page documents shipped product behavior. It is not medical, legal, or
billing advice. Verify against your organization’s policies and applicable
regulations before using it for clinical, compliance, or billing decisions.
Protected health information (PHI) shown in the product is governed by your
tenant’s access controls and is never exposed in this documentation.
Documentation sources
Documentation sources
- src/routes/fm.tsx
- src/cores/fm/pages/FleetAnalyticsPage.tsx