Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <script src="https://cdn.anychart.com/releases/8.11.0/js/anychart-core.min.js"></script>
<script src="https://cdn.anychart.com/releases/8.11.0/js/anychart-venn.min.js"></script>

<div id="container"></div>
              
            
!

CSS

              
                html,
    body,
    #container {
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
    }
              
            
!

JS

              
                anychart.onDocumentReady(function () {
  
  // adding data
  let data = [
    {
      x: "A",
      value: 100,
      name: "TOM BOMBADIL\n\nhomebody,\nblue jacket,\nboots yellow"
    },
    {
      x: "B",
      value: 100,
      name: "SANTA CLAUS\n\nwears red,\nho ho ho,\nsleigh"
    },
    {
      x: "C",
      value: 100,
      name: "GANDALF\n\nwizard,\nfireworks"
    },
    {
      x: "D",
      value: 100,
      name: "DARK LORD SAURON\n\n cute, evil,\nbabygirl, slay"
    },
    {
      x: ["A", "C"],
      value: 40,
      name: "special hat,\nlikes hobbits"
    },
    {
      x: ["A", "B"],
      value: 40,
      name: "merry fellow,\nwife guy"
    },
    {
      x: ["C", "D"],
      value: 40,
      name: "irritable,\nemo maia\nno wife,\nweirdly flirty with\nGaladriel in\nadaptations,\nwould rather not\nspeak to Celeborn"
    },
    {
      x: ["B", "D"],
      value: 40,
      name: "teaches Elves to\nmake things,\nhas flying servants"
    },
    {
      x: ["A", "B", "C"],
      value: 30,
      name: "benevolent,\nbig beard"
    },
    {
      x: ["B", "C", "D"],
      value: 30,
      name: "giver of gifts,\nis coming to town\nbling bling"
    },
    {
      x: ["A", "B", "D"],
      value: 30,
      name: "loves to sing,\nsees you"
    },
    {
      x: ["A", "C", "D"],
      value: 30,
      name: "lives in\nmiddle-earth"
    },
    {
      x: ["A", "B", "C", "D"],
      value: 5,
      name: "ancient,\npowerful,\nmysterious,\nmany names"
    }
  ];

  // creating a venn diagram with the data
  let chart = anychart.venn(data);

  // setting the labels
  chart.labels().format("{%Name}");

  // setting the chart title
  chart.title("Tolkien Venn Diagram");
  
  // setting the container id
  chart.container("container");

  // drawing the diagram
  chart.draw();

});

              
            
!
999px

Console