cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

              <script src="//variancecharts.com/cdn/variance-noncommercial-standalone-f47ffcf.min.js" charset="UTF-8"></script>

<link id="enrollment_rate" rel="variance-data" href="//variancecharts.com/data/enrollment_rate.json">

<div id="education_participation">

  <h3>Global Participation in Primary Education</h3>
  <h4>by net enrollment rate, 2000 &amp; 2009</h4>

  <chart data="#enrollment_rate"
         map-xy="year netEnrollment"
         scale-x-linear="2000 2009" scale-y-linear="70 100">
    <annotation class="year-left">2000</annotation>
    <annotation class="year-right">2009</annotation>
      <span class="label left">{{value}}%</span>
      <span class="label right">{{value}}%</span>
    <groups by="country">
      <line class="{{country}}"></line>
        <point class="{{country}}"></point>
        <annotation class="{{country}}">
          <span class="country">{{country}}</span>
          <span class="enrollment">{{netEnrollment}}</span>

              #education_participation {
  width: 80%;
  padding: 50px 80px 60px 80px;
  color: #444444;
  font-family: Helvetica, Arial, sans-serif;
  background: white;
#education_participation h3 {
  margin: 0 0 4px 0;
  text-align: center;
#education_participation h4 {
  margin: 0 0 28px 0;
  font-weight: normal;
  font-style: italic;
  text-align: center;
  color: #666666;
#education_participation chart {
  width: 30%;
  height: 500px;
  margin-top: 48px;
#education_participation guide-y {
  width: 180%;
  margin-left: -90%;
  left: 50%;
  border: none;
#education_participation guide-y .tick {
  width: 100%;
  border-color: #e2e2e2;
#education_participation guide-y .tick .label {
  text-align: left;
  right: auto;
  color: #cccccc;
  font-size: 24px;
  top: -14px;
  width: 100px;
#education_participation guide-y .tick .label.left {
  margin-left: -108px;
  text-align: right;
#education_participation guide-y .tick .label.right {
  right: 0;
  margin-right: -108px;
  text-align: left;
#education_participation guide-y .tick:nth-child(even) .label {
  display: none;
#education_participation line.World path {
  stroke: orange;
  stroke-width: 2px;
#education_participation point {
  background-color: #444444;
#education_participation point.World {
  background-color: orange;
#education_participation annotation {
  font-size: 12px;
  width: 300px;
  margin-bottom: 7px;
#education_participation annotation.year-right {
  right: 0;
  margin-right: -96px;
#education_participation annotation.year-left {
  text-align: right;
  margin-left: -96px;
#education_participation annotation.year-right, #education_participation annotation.year-left {
  width: auto;
  font-size: 24px;
  top: 6px;
  z-index: 100;
  font-weight: bold;
  width: 100px;
#education_participation annotation.World {
  color: orange;
  text-transform: uppercase;
  font-weight: bold;
#education_participation annotation.World .country {
  color: orange;
#education_participation annotation .enrollment {
  font-weight: bold;
#education_participation annotation .country {
  color: #666666;
#education_participation datum:first-child annotation {
  margin-left: -308px;
  text-align: right;
#education_participation datum:first-child .enrollment {
  float: right;
  margin-left: 4px;
#education_participation datum:last-child annotation {
  margin-left: 8px;
#education_participation datum:last-child .enrollment {
  float: left;
  margin-right: 4px;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................