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 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


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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


<!DOCTYPE html>
    <meta charset="UTF-8" />
    <title>Drug Statistics of TPD Pima County Arrests 2018</title>
  <body onload="killBrand()">
    <script src=""></script>
<script src=""></script>
<script src=""></script>
    <div id="chartdiv"></div>

      function killBrand() {
        document.querySelector("#chartdiv > div:nth-child(2) > svg > g > g:nth-child(2) > g:nth-child(2) > g > g:nth-child(3)").style.display  = "none";



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

#chartdiv {
  width: 100%;
  max-height: 600px;
  height: 100vh;


 * @license
 * Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
 * This sofware is provided under multiple licenses. Please see below for
 * links to appropriate usage.
 * Free amCharts linkware license. Details and conditions:
 * One of the amCharts commercial licenses. Details and pricing:
 * If in doubt, contact amCharts at
 * @hidden
am4internal_webpackJsonp(["ab45"],{lhmh:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("01H4"),n=function(t){Object(i.a)(t,"SpriteState")&&(t.transitionDuration=400),Object(i.a)(t,"Component")&&(t.rangeChangeDuration=700,t.interpolationDuration=700,t.sequencedInterpolation=!1,Object(i.a)(t,"SankeyDiagram")&&(t.sequencedInterpolation=!0),Object(i.a)(t,"FunnelSeries")&&(t.sequencedInterpolation=!0)),Object(i.a)(t,"Chart")&&(t.defaultState.transitionDuration=2e3,t.hiddenState.transitionDuration=1e3),Object(i.a)(t,"Tooltip")&&(t.animationDuration=400,t.defaultState.transitionDuration=400,t.hiddenState.transitionDuration=400),Object(i.a)(t,"Scrollbar")&&(t.animationDuration=700),Object(i.a)(t,"Series")&&(t.defaultState.transitionDuration=1e3,t.hiddenState.transitionDuration=700,,t.showOnInit=!0),Object(i.a)(t,"MapSeries")&&(,Object(i.a)(t,"PercentSeries")&&(,Object(i.a)(t,"FunnelSlice")&&(t.defaultState.transitionDuration=800,t.hiddenState.transitionDuration=1e3,,Object(i.a)(t,"Slice")&&(t.defaultState.transitionDuration=700,t.hiddenState.transitionDuration=1e3,,Object(i.a)(t,"Preloader")&&(t.hiddenState.transitionDuration=2e3),Object(i.a)(t,"Column")&&(t.defaultState.transitionDuration=700,t.hiddenState.transitionDuration=1e3,,Object(i.a)(t,"Column3D")&&(};window.am4themes_animated=n}},["lhmh"]);

var chart = am4core.create("chartdiv", am4charts.XYChart); = [{
    "category": "65,459: Total Arrests By TPD 2018",
    "value2": 10970,
    "value1": 54489,

chart.colors.step = 2;
chart.padding(30, 30, 10, 30);

chart.legend = new am4charts.Legend();
chart.legend.itemContainers.template.cursorOverStyle = am4core.MouseCursorStyle.pointer;

var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
categoryAxis.dataFields.category = "category";
categoryAxis.renderer.minGridDistance = 60;
categoryAxis.renderer.grid.template.location = 0;
categoryAxis.interactionsEnabled = false;

var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
valueAxis.min = 0;
valueAxis.max = 100;
valueAxis.strictMinMax = true;
valueAxis.calculateTotals = true;

valueAxis.renderer.minGridDistance = 20;
valueAxis.renderer.minWidth = 35;

var series1 = chart.series.push(new am4charts.ColumnSeries());
series1.columns.template.tooltipText = "{name}: {valueY.totalPercent.formatNumber('#.00')}%";
series1.columns.template.column.strokeOpacity = 1; = "54,489 Non-Drug";
series1.fill = am4core.color("#FAD7A0");
series1.dataFields.categoryX = "category";
series1.dataFields.valueY = "value1";
series1.dataFields.valueYShow = "totalPercent";
series1.dataItems.template.locations.categoryX = 0.5;
series1.stacked = true;
series1.tooltip.pointerOrientation = "vertical";
series1.tooltip.dy = - 20;
series1.cursorHoverEnabled = false;

var bullet1 = series1.bullets.push(new am4charts.LabelBullet());
bullet1.label.text = "{valueY.totalPercent.formatNumber('#.00')}%";
bullet1.locationY = 0.5;
bullet1.label.fill = am4core.color("#ffffff");
bullet1.interactionsEnabled = false;

var series2 = chart.series.push(series1.clone()); = "10,970 Drug";
series2.dataFields.valueY = "value2";
series2.fill = am4core.color("#EC7063");
series2.stroke = series2.fill;
series2.cursorHoverEnabled = false;
var series3 = chart.series.push(series1.clone()); = "Series 3";
series3.dataFields.valueY = "value3";
series3.fill =;
series3.stroke = series3.fill;
series3.cursorHoverEnabled = false;
chart.scrollbarX = new am4core.Scrollbar();

chart.cursor = new am4charts.XYCursor();
chart.cursor.behavior = "panX";