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.


                <div id="chart-container" class="chart"></div>
<div class="controller">
  <span id="option-label">Please select the format: </span>
  <select id="format" class="option-controller">
    <option value="png">png</option>
    <option value="jpg">jpg</option>
    <option value="pdf">pdf</option>
    <option value="csv">csv</option>
    <option value="xlsx">xlsx</option>
  <button id="export" class="btn btn-secondary-grad ml-1">Export</button>


                .chart {
  width: 100%;
  height: 400px;

#option-label {
  font-weight: 600;
  color: black;
  display: inline;

.controller {
  text-align: center;

.option-controller {
  width: 250px;
  margin-top: 5px;
  box-sizing: border-box;
  box-shadow: 0 2px 4px 0 rgba(62, 57, 107, 0.05);
  background-image: none;
  overflow: hidden;
  position: relative;
  background-clip: padding-box;
  background-color: #ffffff;
  border: 1px solid #dadae4;
  border-radius: 0.5rem;
  color: #434456;
  font-size: 15px;
  line-height: 1.5;
  padding: 1rem 1.5rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
    95%/12px no-repeat #fff;
  padding-right: 20px;
  text-transform: none;

.option-controller:focus {
  outline: none;



                var jsonify = res => res.json();
var dataFetch = fetch('').then(jsonify);
var schemaFetch = fetch('').then(jsonify);

Promise.all([dataFetch, schemaFetch]).then(res => {
  var data = res[0];
  var schema = res[1];
  var fusionTable = new FusionCharts.DataStore().createDataTable(data, schema);

  const dataStore = new FusionCharts.DataStore();
  const dataSource = {
    "caption": {
      "text": "Web visits & downloads",
      outputFormat: "%b %y"
    "subcaption": {
      "text": "since 2015"
    "yaxis": [{
      plot: [{
          value: "Downloads",
          type: "column"
          value: "Web Visits",
          type: "column"
      "title": "",
      "style": {
        "label": {
          'fill-opacity': "0"
        "tick-mark": {
          'stroke-opacity': 0
    "chart": {
    exportEnabled: 1,
      theme: "fusion",
      "style": {
        "canvas": {
          'stroke-opacity': "0"
  }; = dataStore.createDataTable(data, schema);

let chart =   new FusionCharts({
    type: "timeseries",
    renderAt: "chart-container",
    width: "100%",
    height: "100%",
  function export_chart() {
        var format = document.getElementById("format").value;
          "exportFormat": format
  document.getElementById("export").addEventListener("click", export_chart);