cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              <div class="chart-type">
    Chart type:
    <select id="chartType">
        <option value="line">Line</option>
        <option value="spline">Spline</option>
        <option value="area">Area</option>
        <option value="area-spline">Area spline</option>
        <option value="step">Step</option>
        <option value="area-step">Area step</option>
<div id="sales" class="example-viz"></div>

              @import url(https://fonts.googleapis.com/css?family=Roboto:400, 700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans);

body {
    font-family: 'Open Sans', sans-serif;
div.chart-type {
    font-size: 0.8em;
    margin-bottom: 15px;
    position: absolute;
    right: 20px;
    top: 5px;
    z-index: 100;
div.chart-type select {
    margin-left: 5px;
div.example-viz {
    height: 250px;

              var connect = new Connect({
    projectId: '558a0f311f2ddd0bf4ebcd1d',
    apiKey: '5D07A77D87D5B20FA5508303F748A43B-DDFA284A9341068A704A846E83ACF49069D960632C4F74A44B5EE330073F79A8324ADC91023F88F63AAE4507F3D119B5C7F31A2D7D9616408E9665EC6C1DEBE3'

var query = connect.query('carsales')
        units: 'count'

var chart;
function displayChart() {
    chart = Connect.visualize(query)
            title: 'Electric Car Sales 2018 (Units)',
            chart: {
                type: $('#chartType').val(),
                // only stack for area charts
                stack: $('#chartType').val().indexOf("area") == 0

$('select').change(function () {

Loading ..................