Get started with jquery-sparklines CDN

BSD-3-Clause licensed

JQuery Sparklines: Library for creating small, data-driven charts with HTML and Sparkline data.

Tags:
  • jquery
  • sparkline

Stable version

Copied!

How to start using jquery-sparklines CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with jquery-sparklines CDN - cdnhub.io</title>
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  <script src="https://cdn.cdnhub.io/jquery-sparklines/2.1.2/jquery.sparkline.min.js"></script>
  <style>
    #chart1 { width: 300px; height: 100px; }
  </style>
</head>
<body>
  <div id="chart1"></div>
  <script>
    $(document).ready(function() {
      $("#chart1").sparkline([105, 123, 126, 135, 131, 128, 130, 136, 135, 131], {
        type: 'line',
        lineColor: 'blue',
        fillColor: 'rgba(0, 128, 0, 0.1)',
        height: 100
      });
    });
  </script>
</body>
</html>
Copied!
Copied!

All versions