Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

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


Auto Save

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.


                <p>Inspired from <a href="" target="_blank"></a></p>

<p>Github repository here: <a href=""></a></p>

<main ng-app="app">
  <cg-percent-pie percent="0"></cg-percent-pie>
  <cg-percent-pie percent="1"></cg-percent-pie>
  <cg-percent-pie percent="2"></cg-percent-pie>
  <cg-percent-pie percent="7"></cg-percent-pie>
  <cg-percent-pie percent="13"></cg-percent-pie>
  <cg-percent-pie percent="23"></cg-percent-pie>
  <cg-percent-pie percent="43"></cg-percent-pie>
  <cg-percent-pie percent="53"></cg-percent-pie>
  <cg-percent-pie percent="73"></cg-percent-pie>
  <cg-percent-pie percent="83"></cg-percent-pie>
  <cg-percent-pie percent="97"></cg-percent-pie>
  <cg-percent-pie percent="100"></cg-percent-pie>


                @mixin cg-percent-pie($border-size: 3px, $circle-size: 80px, $percent-font-size: 20%, $circle-color: rgb(85, 199, 215), $circle-shadow: rgb(212, 212, 212))

    &, &:before, &:after
      box-sizing: border-box

      display: block
      transform: rotate(45deg)

    clip: rect(0, 1em, 1em, .5em)
      display: none

    font-size: $circle-size
    width: 1em
    height: 1em
    position: relative
    float: left
    border: $border-size solid $circle-shadow
    border-radius: 50%
    @extend %box-sizing

      content: attr(data-percent) '%'
      font-family: sans-serif
      white-space: nowrap
      font-size: $percent-font-size
      position: absolute
      top: 50%
      left: 50%
      transform: translate(-50%, -50%)

    position: absolute
    top: -$border-size
    left: -$border-size
    width: 1em
    height: 1em
    @extend %box-sizing

    &:after, &:before
      content: ''
      position: absolute
      width: 100%
      height: 100%
      border-width: $border-size
      border-style: solid
      border-color: $circle-color $circle-color transparent transparent
      border-radius: 50%

    @for $i from 0 through 100
          $rotate: -135 + ($i * 3.6)
          transform: rotate($rotate * 1deg)

    @for $i from 0 through 50
        @extend %clip-pie

    @for $i from 51 through 100
          @extend %right-cirlce
@include cg-percent-pie()

  margin: 10px


                angular.module('app', [])
.directive 'cgPercentPie', ->
  restrict: 'E'
  replace: true
  template: '
<div class="cg-pie-wrapper" data-percent="{{ percent }}">
  <div class="cg-pie percent-{{ percent }}"></div>
    percent: '@'