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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 class="container-fluid">
  <div class="card shadow mt-2 mb-2 mr-2 ml-2">
    <div class="card-body">
      <div id="chart-container"></div>


                .shadow {
  text-align: center !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 6px 14px 0 rgba(33, 35, 68, 0.09) !important;

#chart-container {
  width: 100%;
  height: 450px;



                function fetchCheckStatus(response) {
  if (response.status >= 200 && response.status < 300) {
    return response;
  const error = new Error(response.statusText);
  error.response = response;
  throw error;

function loadData(url) {
  const option = {
    method: "GET",
    headers: new Headers(),
    mode: "cors",
    cache: "default"

  return fetch(url, option)
    .then(function (resp) {
      const contentType = resp.headers.get("Content-Type");
      if (contentType && contentType.indexOf("application/json") !== -1) {
        return resp.json();
      return resp.text();
    .then(function (data) {
      return data;
    .catch(function () {
      console.log("Something went wrong! Please check data/schema files");

]).then((res) => {
  const data = res[0];
  const schema = res[1];

  const dataStore = new FusionCharts.DataStore(data, schema);

  new FusionCharts({
    type: "timeseries",
    renderAt: "chart-container",
    width: "100%",
    height: "100%",
    dataSource: {
      chart: {
        startOfWeek: 0,
        theme: "fusion"
      caption: {
        text: "Weekly Online Sales of a SuperStore in the US"
      xAxis: {
        plot: "Time",
        binning: {
          year: [],
          month: [],
          day: [],
          week: [2],
          hour: [],
          minute: [],
          second: []
      yAxis: [
          plot: {
            value: "Sales",
            aggregation: "Average"
      data: dataStore.getDataTable()