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


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.


                <link href="" rel="stylesheet"/>
<script src=""></script>
<script src=""></script>

<div id="wdr-component"></div>


                #wdr-pivot-view .link {
  text-decoration: underline;


                var pivot = new WebDataRocks({
  container: "#wdr-component",
  height: 500,
  customizeCell: customizeCellFunction,
  toolbar: true,
  report: {
    dataSource: {
      data: getData()
    slice: {
      reportFilters: [{ uniqueName: "InvoiceId" }],
      rows: [{ uniqueName: "Brand" }, { uniqueName: "Salesman" }],
      columns: [{ uniqueName: "Measures" }],
      measures: [{ uniqueName: "Total", aggregation: "sum" }]

function customizeCellFunction(cellBuilder, cellData) {
  if (cellData.isDrillThrough) {
    if (
      cellData.type == "value" &&
      cellData.hierarchy &&
      cellData.hierarchy.uniqueName == "InvoiceId"
    ) {
      cellBuilder.text = '<a href="/ViewInvoice/$InvoiceId" traget="_blank" class="link">Open Invoice</a>'.replace("$InvoiceId", cellData.label);

function getData() {
  return [
      InvoiceId: "5bf51fc39a54beb8f2be5ca6",
      Brand: "Fuelton",
      Salesman: "Nita Robertson",
      Total: 2798
      InvoiceId: "5bf51fc3b0272f0577dd1272",
      Brand: "Farmage",
      Salesman: "Alexandria Pollard",
      Total: 1249
      InvoiceId: "5bf51fc362cfc9b56c7c21b7",
      Brand: "Deminimum",
      Salesman: "Edna Greer",
      Total: 3817
      InvoiceId: "5bf51fc303cc709df7d4129a",
      Brand: "Senmei",
      Salesman: "Maria Mclaughlin",
      Total: 3140
      InvoiceId: "5bf51fc3246a743da5ab0fbc",
      Brand: "Barkarama",
      Salesman: "Claudine Bush",
      Total: 3465
      InvoiceId: "5bf51fc35cde6c808fa6f33d",
      Brand: "Scenty",
      Salesman: "Sawyer Sosa",
      Total: 3661
      InvoiceId: "5bf51fc3da5a5e082248737e",
      Brand: "Insuron",
      Salesman: "Ford Douglas",
      Total: 3158