</> ConvertAtlas Developer Tools
Bootstrap 5 · Intermediate

Weather Card with Chart

A gradient weather card with a sparkline temperature trend, via ApexCharts.

Requires Bootstrap 5, ApexCharts. Add the CDN tags below to your page (styles in <head>, scripts before </body>). The downloaded file already includes them.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts@3.49.1/dist/apexcharts.min.js"></script>
<div class="card border-0 text-white" style="width:340px;max-width:100%;background:linear-gradient(135deg,#2980b9,#6dd5fa)"><div class="card-body">
  <div class="d-flex justify-content-between"><div><div class="opacity-75 small">Riga, LV</div><div class="display-5 fw-bold">18°</div></div><div class="display-4">⛅</div></div>
  <div id="wcChart"></div>
</div></div>
new ApexCharts(document.getElementById('wcChart'),{chart:{type:'line',height:120,toolbar:{show:false},sparkline:{enabled:true}},series:[{name:'°C',data:[14,16,18,20,19,17,15]}],colors:['#ffffff'],stroke:{curve:'smooth',width:3},markers:{size:3,colors:['#fff']},tooltip:{theme:'dark'}}).render();
Free to use.This component uses Bootstrap 5, ApexCharts (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.