How to use @google/dscc - 6 common examples

To help you get started, we’ve selected a few @google/dscc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googledatastudio / tooling / templates / viz-codelab / src / index.js View on Github external
div.innerHTML = `<h2>Community Visualization Codelab</h2>
  This is the starter template for the <code>dscc-gen</code> codelab.
  <p>
  There are currently ${data.tables.DEFAULT.length} rows in the data.
  </p>
  `;

  document.body.appendChild(div);
  console.log(data);
};

// renders locally
if (LOCAL) {
  drawViz(local.message);
} else {
  dscc.subscribeToData(drawViz, {transform: dscc.objectTransform});
}
github googledatastudio / tooling / templates / viz / src / index.js View on Github external
const local = require('./localMessage.js');

// change this to 'true' for local development
// change this to 'false' before deploying
export const LOCAL = true;

// write viz code here
const drawViz = (data) => {
  viz.firstViz(data);
};

// renders locally
if (LOCAL) {
  drawViz(local.message);
} else {
  dscc.subscribeToData(drawViz, {transform: dscc.objectTransform});
}

@google/dscc

`dscc` (Data Studio Community Component) is a library to help with the building of community components for Google Data Studio. It can be used as a standalone library, or as a npm dependency.

Apache-2.0
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis