Get started with jqPlot CDN

(MIT OR GPL-2.0 OR CC-BY-3.0) licensed

JqPlot is a popular library for creating interactive charts and graphs.

Tags:
  • chart
  • charts
  • charting
  • plotting
  • graphing

Stable version

Copied!

How to start using jqPlot CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with jqPlot CDN - cdnhub.io</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.cdnhub.io/jqPlot/1.0.9/jquery.jqplot.min.js"></script>
    <style>
        #chart div { width: 50%; height: 300px; float: left; margin-right: 1%; }
    </style>
</head>
<body>
    <div id="chart1"></div>
    <div id="chart2"></div>

    <script>
        $(document).ready(function () {
            var plot1 = $.jqplot('chart1', [
                [0, 4], [1, 8], [2, 15], [3, 12], [4, 13], [5, 10], [6, 3], [7, 7], [8, 16]
            ], {
                title: 'First Chart',
                series: [{
                    label: 'Series 1'
                }]
            });

            var plot2 = $.jqplot('chart2', [
                [0, 8], [1, 3], [2, 4], [3, 13], [4, 11], [5, 15], [6, 12], [7, 9], [8, 6]
            ], {
                title: 'Second Chart',
                series: [{
                    label: 'Series 1'
                }],
                axes: {
                    xaxis: {
                        label: 'X Axis'
                    },
                    yaxis: {
                        label: 'Y Axis'
                    }
                }
            });
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions