How to use @cubejs-client/react - 2 common examples

To help you get started, we’ve selected a few @cubejs-client/react 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 cube-js / cube.js / examples / real-time-dashboard / dashboard-app / src / components / ChartRenderer.js View on Github external
const ChartRenderer = ({ vizState, cubejsApi }) => {
  const { query, chartType } = vizState;
  const component = TypeToMemoChartComponent[chartType];
  const renderProps = useCubeQuery(query, { subscribe: true, cubejsApi });
  return component && renderChart(component)(renderProps);
};
github cube-js / cube.js / packages / cubejs-server-core / dev / templates / packages / react-antd-dynamic / scaffolding / src / components / ChartRenderer.js View on Github external
const ChartRenderer = ({ vizState }) => {
  const { query, chartType } = vizState;
  const component = TypeToMemoChartComponent[chartType];
  const renderProps = useCubeQuery(query);

  return component && renderChart(component)(renderProps);
};

@cubejs-client/react

React components for cube.js

MIT
Latest version published 13 days ago

Package Health Score

95 / 100
Full package analysis

Popular @cubejs-client/react functions