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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.


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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <!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) {