Chart gallery
Use when: you have continuous data over time — daily shipments, revenue, or on-time rate. Use multi-series lines to compare cohorts.
Use when: comparing values across categories — zones, drivers, vehicle types. Horizontal bars work better for long labels.
Use when: showing cumulative or aggregate totals — total parcels shipped, monthly revenue. The filled area emphasizes magnitude.
Use when: visualizing proportions — delivery status mix, payment method breakdown. Limit to 5 segments for legibility.
Use when: comparing one entity across 4-8 dimensions — driver performance (speed, safety, ratings), vehicle health profiles.
Use when: displaying progress toward a goal — capacity utilization, on-time rate, fleet readiness. Eye-catching for dashboards.
Add a container div
Include an empty <div> with one of the predefined chart IDs and a height utility class.
<div id="chart-revenue"
class="chart-h-300">
</div>
Include the scripts
Before </body>, include ApexCharts then the local charts.js. The chart will render automatically on DOM ready.
<script src="apexcharts.min.js"> </script> <script src="assets/js/charts.js"> </script>
Customize as needed
Edit charts.js to change data, labels, or colors. Each chart is keyed by its container ID.
charts['chart-revenue'] =
function() {
/* your options */
};
| Class | Height | Best for |
|---|---|---|
.chart-h-200 | 200px | Sparklines, mini-cards, compact KPI graphs |
.chart-h-260 | 260px | Side widgets, small radial bars |
.chart-h-300 | 300px | Standard dashboard charts (most common) |
.chart-h-340 | 340px | Featured trend charts, large bars |
.chart-h-400 | 400px | Hero charts, full-width report charts |