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.


                <script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<div id="chartdiv"></div>


                body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

#chartdiv {
  width: 100%;
  height: 350px;



 * --------------------------------------------------------
 * This demo was created using amCharts V4 preview release.
 * V4 is the latest installement in amCharts data viz
 * library family, to be released in the first half of
 * 2018.
 * For more information and documentation visit:
 * --------------------------------------------------------

/* Create map instance */
var chart = am4core.create("chartdiv", am4maps.MapChart);

/* Set map definition */
chart.geodata = am4geodata_worldLow;

/* Set projection */
chart.projection = new am4maps.projections.Mercator();

function createSeries(name, include, color, hoverColor) {
  var series = chart.series.push(new am4maps.MapPolygonSeries()); = name;
  series.useGeodata = true;
  series.include = include;
  series.fill = am4core.color(color);"over", over);"out", out);
  series.mapPolygons.template.tooltipText = "{}: [bold]{name}[/]";
  series.mapPolygons.template.fill = am4core.color(color);

  var hover = series.mapPolygons.template.states.create("highlight"); = am4core.color(hoverColor);

  return series;

createSeries("Northern Europe", ["FI", "DK", "SE", "NO", "LT", "LV", "EE", "IS"], "#96BDC6", "#669DA6");
createSeries("Central Europe", ["AT", "CZ", "DE", "HU", "LI", "PL", "SK", "SI", "CH"], "#81968F", "#51665F");
createSeries("Eastern Europe", ["MD", "BY", "UA"], "#CFB9A5", "#AF9975");
createSeries("Southeast Europe", ["AL", "BA", "BG", "HR", "GR", "XK", "MK", "ME", "RO", "RS"], "#E8CCBF", "#C89C8F");
createSeries("Western Europe", ["BE", "FR", "IE", "IT", "LU", "MC", "NL", "GB", "ES", "PT", "AD"], "#99C78F", "#69975F");

chart.legend = new am4maps.Legend();
chart.legend.position = "right";

function over(ev) { {

function out(ev) { {