Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

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

Packages

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.

Behavior

Auto Save

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.

HTML

              
                <div class="container-fluid">
  <div class="row mt-2 mb-3 pr-1 pl-1">
    <div class="col text-center">
      <img id="image" src="https://cdn4.iconfinder.com/data/icons/aiga-symbol-signs/612/aiga_air_transportation_bg-64.png" class="mr-3">
      <span class="title-text">World's Busiest Airports - 2019</span>
    </div>
  </div>
  
  <div class="row pr-1 pl-1">
    <div class="col-7">
      <div class="card">
        <div class="card-body">
          <div class="chart" id="chart1"></div>
        </div>
      </div>
    </div>
    <div class="col-5" style="max-height: 450px;">
      <div class="row mb-3">
        <div class="col">
          <div class="card">
            <div class="card-body">
              <div class="kpi text-center">
                <div class="kpi-title">Busiest Airport</div>
                <div class="kpi-value">Hartsfield-Jackson Atlanta</div>
                <div class="kpi-sec-value">
                  <span class="num-kpi">2019 - 107.39M Passengers (<span class="green">↑3.36%</span>)</span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="row mt-3">
        <div class="col">
          <div class="card">
            <div class="card-body">
              <div class="chart-small" id="chart2"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  
</div>

              
            
!

CSS

              
                body {
	font-family: "Lato", sans-serif;
}

.title-text {
	font-weight: 700;
	font-size: 2.1rem;
	display: inline-block;
	vertical-align: middle;
}

#image {
	height: 64px;
	width: 64px;
	display: inline-block;
	vertical-align: middle;
}

.chart {
	width: 100%;
	height: 450px;
}

.chart-small {
	width: 100%;
	height: 300px;
}

.kpi {
	width: 100%;
	height: 93px;
}

.card .card-body {
	padding: none !important;
	margin: none !important;
}

.kpi-title {
	font-size: 1.25rem;
}

.kpi-value {
	font-size: 1.5rem;
}

.green {
	color: #28a745;
}

.num-kpi {
	color: #8892a0;
	font-size: 0.875rem;
}

              
            
!

JS

              
                new FroalaCharts({
  type: 'stackedcolumn',
  renderAt: 'chart1',
  id: 'chart-1',
  width: '100%',
  height: '100%',
  dataSource: {
    chart: {
      caption: "Top 10 Busiest Airports Wordwide",
      subcaption: "By Passenger Traffic (2017-19)",
      theme: "froala",
      canvasBottomMargin: 22,
      chartBottomMargin: 22
    },
    categories: [{
      category: [{
          label: "Hartsfield-Jackson Atlanta"
        },
        {
          label: "Beijing"
        },
        {
          label: "Dubai"
        },
        {
          label: "LAX Los Angeles"
        },
        {
          label: "Narita Tokyo"
        },
        {
          label: "O'Hare Chicago"
        },
        {
          label: "Heathrow London"
        },
        {
          label: "Hong Kong"
        },
        {
          label: "Shanghai"
        },
        {
          label: "Charles de Gaulle Paris"
        }
      ]
    }],
    dataset: [{
      seriesname: "2017",
      data: [{
          "value": "104171935"
        },
        {
          "value": "94393454"
        },
        {
          "value": "83654250"
        },
        {
          "value": "80921527"
        },
        {
          "value": "79699762"
        },
        {
          "value": "78327479"
        },
        {
          "value": "75715474"
        },
        {
          "value": "70314462"
        },
        {
          "value": "66002414"
        },
        {
          "value": "65933145"
        },
        {
          "value": "63625534"
        }
      ]
    }, {
      seriesname: "2018",
      data: [{
          "value": "103902992"
        },
        {
          "value": "95786442"
        },
        {
          "value": "88242099"
        },
        {
          "value": "84557968"
        },
        {
          "value": "85408975"
        },
        {
          "value": "79828183"
        },
        {
          "value": "78014598"
        },
        {
          "value": "72665078"
        },
        {
          "value": "70001237"
        },
        {
          "value": "69471442"
        },
        {
          "value": "68515425"
        }
      ]
    }, {
      seriesname: "2019",
      data: [{
          "value": "107394029"
        },
        {
          "value": "100983290"
        },
        {
          "value": "89149387"
        },
        {
          "value": "87534384"
        },
        {
          "value": "87131973"
        },
        {
          "value": "83339186"
        },
        {
          "value": "80126320"
        },
        {
          "value": "74517402"
        },
        {
          "value": "74006331"
        },
        {
          "value": "72229723"
        },
        {
          "value": "71053157"
        }
      ]
    }]
  }
}).render();

new FroalaCharts({
  type: 'pie',
  renderAt: 'chart2',
  id: 'chart-2',
  width: '100%',
  height: '100%',
  dataSource: {
    chart: {
      caption: "Split of Busiest Airports",
      subCaption: "By Region",
      theme: "froala",
      pieRadius: "50%",
      showLabels: 0,
			canvasBottomMargin: 22,
      chartBottomMargin: 22
    },
    data: [{
        label: "North America",
        value: 3
      },
      {
        label: "Asia",
        value: 4
      },
      {
        label: "Middle East",
        value: 1
      },
      {
        label: "Europe",
        value: 3
      }
    ]
  }
}).render();

              
            
!
999px

Console