Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <!DOCTYPE html>
<html lang="en" style="height: 100%">
    <meta charset="utf-8">
    <title>Adressaparken API example (single sensor)</title>
    <!-- Simple example plotting a single sensor using chart.js -->
    <!-- -->
    <script src="" integrity="sha256-qSIshlknROr4J8GMHRlW3fGKrPki733tLq+qeMCR05Q=" crossorigin="anonymous"></script>
<body style="height: 90%; margin: 10px">
    <canvas id="myChart"></canvas>

         * ==== API QUERY ==== 
         * Ask parken API for the last 110 results of temperature
         * Fields:
         * limit: 110 (number of results to return)
         * offset: 0 (offset would handly pagination, we wont use it in this case)
         * sensor: TC (see list of sensors and naming convention in API Overview)
         * ==== Extract JSON from response ==== 
        .then(function(response) {
            return response.json();
         * ==== Plot data ==== 
         * From here everything relates to chart.js 
         * see documentation at
        .then(function(data) {
            var myChart = new Chart(
                    type: 'line',
                    data: {
                    		datasets: [{
                          	label: 'Temperature °C',
                            borderColor: '#63DFE5',
                            backgroundColor: '#32949920',
                            pointStyle: 'circle',
                            pointRadius: 3,
                            pointHoverRadius: 5,
                        		data: => ({t: new Date(, y: item.value}))
                    options: {
                        responsive: true, // allow to resize
                        maintainAspectRatio: false, // allow to resize view in both directions
                        scales: {
                            xAxes: [{
                                type: 'time'
         * ==== Error handling ==== 
         * Something went wrong when fetching data 
        .catch(function(e) {