Pen Settings

HTML

CSS

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

JavaScript

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

Behavior

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.

HTML

              
                <script src="//www.amcharts.com/lib/4/core.js"></script>
<script src="//www.amcharts.com/lib/4/themes/animated.js"></script>
<script src="//www.amcharts.com/lib/4/themes/amchartsdark.js"></script>
<div id="introchart"></div>
              
            
!

CSS

              
                body {
  background: #303950;
  margin: 0px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#introchart {
  width: 100%;
  height: 350px;
  position: absolute;
}

              
            
!

JS

              
                am4core.useTheme(am4themes_amchartsdark);
am4core.useTheme(am4themes_animated);

// main container
var mainContainer = am4core.create("introchart", am4core.Container);
mainContainer.width = am4core.percent(100);
mainContainer.height = am4core.percent(100);

// create circle 
var circle = mainContainer.createChild(am4core.Circle);
circle.radius = 50;
circle.fill = am4core.color("#0975da");
// put it in center
circle.align = "center";
circle.valign = "middle";

// make the circle to be show initially, meaning it will animate it's properties from hidden state to default state
circle.showOnInit = true;

circle.defaultState.transitionEasing = am4core.ease.elasticOut;
circle.defaultState.transitionDuration = 2500;

// make it appear from bottom by setting dy of hidden state to 300;
circle.hiddenState.properties.dy = 300;

// repeating show/hide
setTimeout(hide, 3000);

function hide(){
  circle.hide();
  setTimeout(show, 2500);
}

function show(){
  circle.show();
  setTimeout(hide, 2500);
}
              
            
!
999px

Console