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.


                <div class="content">
  <div class="content__container">
    <h3>Radial Chart</h3>
      <div id="chart"></div>
      <div id="legend"></div>


                .content__container {
  padding: 1em;

rs-radial-chart {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

/* --- Chart customisation --- */

.stripe {
  mask: url(#mask-stripe);

/* --- Segment background hover  --- */

.d3-rc .segment-bg {
  transition: opacity cubic-bezier(0.175, 0.885, 0.335, 1.155) 800ms;

.d3-rc .segment-bg:not(:hover) {
  opacity: 0.0;

.d3-rc .segment-bg:hover {
  opacity: 1.0;

/* --- Average band and colour  --- */

.d3-rc .band circle {
  fill: none;
  stroke-width: 16px;
  stroke-opacity: 0.4;

#legend {
  height: 150px;


                function _dummyData(range) {
  let color = d3.scale.category20(),
      r = RedsiftCore.Lang.localShortMonths();
  r = r.concat(RedsiftCore.Lang.localShortMonths(), RedsiftCore.Lang.localShortMonths());
  return, i) => {
    let v = Math.random() * range;
    return {
      name: m,
      value: v,
      color: () => { return color(v); },
      classed: (i !== 1) ? undefined : 'stripe'
  }).filter((d, i) => { return i < 12; });

// With native web components support (e.g. chrome) the WebComponentsReady event will NOT fire.
// Web components upgrade synchronously, so there is no need for that. If you have to use the
// web components polyfill enable the following event listener:
// (see
// window.addEventListener('WebComponentsReady', function(e) {
var chart = document.querySelector('rs-radial-chart');

if (chart) {
  // Setup radial chart via public API = _dummyData(200);

  var count = 0;
  setInterval(() => { =  _dummyData((Math.random() * 400) + 20);
  }, 2500);
// });