Snippets Chart

Bootstrap 5 Animated Gradient Line Chart (No Library)

An animated smooth line chart with a soft gradient fill, a total headline and keyboard-accessible data points with tooltips.

Bootstrap 5 No jQuery Feb 2020 2.1K views

<section class="wdw-stage">
<div class="container" style="max-width:820px">
<div class="wdw-card p-4 p-md-5">
<div class="d-flex flex-wrap align-items-start justify-content-between gap-3 mb-4">
<div><span class="wdw-eyebrow">Growth</span><h2 class="wdw-heading h3 mb-1">New signups</h2><p class="wdw-muted mb-0">January to June, hover or tab to a point for details.</p></div>
<div class="text-md-end"><div class="display-6 wdw-heading lh-1" id="chartTotal">0</div><span class="badge rounded-pill text-bg-success mt-2">+62% vs. January</span></div>
</div>
<div class="gchart" id="gradChart" role="group" aria-label="Line chart of monthly signups"></div>
</div>
</div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.